From 8843a98210bf55b96c7a8d122633bc9cb7fa6446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Thu, 24 Nov 2016 13:17:00 -0800 Subject: [PATCH] Bug 1319936 - Remove String generics uses in dom. r=billm --HG-- extra : rebase_source : f2b40e5d4a423035d2de8739570a76305a058cf0 --- dom/bindings/test/test_interfaceToString.html | 2 +- dom/encoding/test/test_TextEncoder.js | 2 +- dom/security/test/cors/test_CrossSiteXHR.html | 2 +- dom/tests/mochitest/fetch/test_fetch_cors.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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 : "";