diff --git a/dom/bindings/test/test_interfaceToString.html b/dom/bindings/test/test_interfaceToString.html index c97b2f63b5b7..5c14fced828c 100644 --- a/dom/bindings/test/test_interfaceToString.html +++ b/dom/bindings/test/test_interfaceToString.html @@ -20,7 +20,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=742156 /** Test for Bug 742156 **/ -var nativeToString = ("" + String.replace).replace("replace", "EventTarget"); +var nativeToString = ("" + String).replace("String", "EventTarget"); try { var eventTargetToString = "" + EventTarget; is(eventTargetToString, nativeToString, diff --git a/dom/encoding/test/test_TextEncoder.js b/dom/encoding/test/test_TextEncoder.js index 7aa521398dad..531937effb2f 100644 --- a/dom/encoding/test/test_TextEncoder.js +++ b/dom/encoding/test/test_TextEncoder.js @@ -182,7 +182,7 @@ function testStreamingOptions() } function arrayFromString(s) { - return s.split('').map(function(c){return String.charCodeAt(c)}); + return s.split('').map(function(c){return c.charCodeAt(0)}); } function testArrayOfStrings(test) diff --git a/dom/security/test/cors/test_CrossSiteXHR.html b/dom/security/test/cors/test_CrossSiteXHR.html index b3cda3b871f3..714fb2868fb4 100644 --- a/dom/security/test/cors/test_CrossSiteXHR.html +++ b/dom/security/test/cors/test_CrossSiteXHR.html @@ -673,7 +673,7 @@ function runTest() { reqHeaders = escape(Object.keys(test.headers) .filter(isUnsafeHeader) - .map(String.toLowerCase) + .map(s => s.toLowerCase()) .sort() .join(",")); req.url += reqHeaders ? "&requestHeaders=" + reqHeaders : ""; diff --git a/dom/tests/mochitest/fetch/test_fetch_cors.js b/dom/tests/mochitest/fetch/test_fetch_cors.js index ac83d050d243..412bb1288e18 100644 --- a/dom/tests/mochitest/fetch/test_fetch_cors.js +++ b/dom/tests/mochitest/fetch/test_fetch_cors.js @@ -759,7 +759,7 @@ function testModeCors() { reqHeaders = escape(Object.keys(test.headers) .filter(isUnsafeHeader) - .map(String.toLowerCase) + .map(s => s.toLowerCase()) .sort() .join(",")); req.url += reqHeaders ? "&requestHeaders=" + reqHeaders : "";