Bug 1479045 [wpt PR 12213] - Avoid using the JavaScript reserved word `arguments`, a=testonly
authorC. Scott Ananian <cscott@cscott.net>
Thu, 02 Aug 2018 14:26:20 +0000
changeset 826260 41c45c294a42fb773a773aae70d86a32479cd9aa
parent 826259 a8be596b32995e03bc6ceac5fcfa081377f2ae73
child 826261 0be309fac53a652b380df519bf41db074cbe1570
push id118275
push userbmo:dharvey@mozilla.com
push dateFri, 03 Aug 2018 11:44:33 +0000
reviewerstestonly
bugs1479045, 12213
milestone63.0a1
Bug 1479045 [wpt PR 12213] - Avoid using the JavaScript reserved word `arguments`, a=testonly Automatic update from web-platform-testsAvoid using the JavaScript reserved word `arguments` ES6 complains if the JS reserved word `arguments` is used in strict mode. Rename variable to avoid issues --- especially when test cases are reused with other test harnesses. -- wpt-commits: fe830a9732f4748d37a932d1b2c813e2ed47d491 wpt-pr: 12213
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/dom/nodes/Comment-Text-constructor.js
testing/web-platform/tests/dom/nodes/Node-textContent.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -576009,17 +576009,17 @@
    "c36ba0d117479dc6fc5437733e80050b111895c1",
    "support"
   ],
   "dom/nodes/ChildNode-replaceWith.html": [
    "aab8b17f2a2fa67cee95c791d8cdeb50b01a1861",
    "testharness"
   ],
   "dom/nodes/Comment-Text-constructor.js": [
-   "360b9760e3e2650453f13f03ced8695c78b28e8e",
+   "24b4425f4ba398c1b60579fbdf33c4517e5512c5",
    "support"
   ],
   "dom/nodes/Comment-constructor.html": [
    "5091316bd3c04c9c22f72c0ba6beba1680226e99",
    "testharness"
   ],
   "dom/nodes/DOMImplementation-createDocument.html": [
    "72519dd38d994409bf138cfb86897a3b75ef1e92",
@@ -576781,17 +576781,17 @@
    "fb22583222062dbee1d71d256bd7cb0bfefe19a1",
    "testharness"
   ],
   "dom/nodes/Node-replaceChild.html": [
    "e8ba496cd01121db2ad1a251f7f3d132e5e98fb7",
    "testharness"
   ],
   "dom/nodes/Node-textContent.html": [
-   "9378dec806cccf9aa7d6bb9346bfc7d283467202",
+   "cf2e0720877083aab478541e070b08c608c2b1bb",
    "testharness"
   ],
   "dom/nodes/NodeList-Iterable.html": [
    "fcbee175cb3e07235fcd759e866feb488e31e91f",
    "testharness"
   ],
   "dom/nodes/ParentNode-append.html": [
    "dcc398f3f586d1d627d0ffa0c689f3b1f67ece16",
--- a/testing/web-platform/tests/dom/nodes/Comment-Text-constructor.js
+++ b/testing/web-platform/tests/dom/nodes/Comment-Text-constructor.js
@@ -18,31 +18,31 @@ function test_constructor(ctor) {
 
   test(function() {
     var object = new window[ctor]();
     assert_equals(object.data, "");
     assert_equals(object.nodeValue, "");
     assert_equals(object.ownerDocument, document);
   }, "new " + ctor + "(): no arguments");
 
-  var arguments = [
+  var testArgs = [
     [undefined, ""],
     [null, "null"],
     [42, "42"],
     ["", ""],
     ["-", "-"],
     ["--", "--"],
     ["-->", "-->"],
     ["<!--", "<!--"],
     ["\u0000", "\u0000"],
     ["\u0000test", "\u0000test"],
     ["&amp;", "&amp;"],
   ];
 
-  arguments.forEach(function(a) {
+  testArgs.forEach(function(a) {
     var argument = a[0], expected = a[1];
     test(function() {
       var object = new window[ctor](argument);
       assert_equals(object.data, expected);
       assert_equals(object.nodeValue, expected);
       assert_equals(object.ownerDocument, document);
     }, "new " + ctor + "(): " + format_value(argument));
   });
--- a/testing/web-platform/tests/dom/nodes/Node-textContent.html
+++ b/testing/web-platform/tests/dom/nodes/Node-textContent.html
@@ -106,27 +106,27 @@ doctypes.forEach(function(argument) {
   var doctype = argument[0], creator = argument[1]
   test(function() {
     assert_equals(doctype.textContent, null)
   }, "For DocumentType created by " + creator + ", textContent should be null")
 })
 
 // Setting
 // DocumentFragment, Element:
-var arguments = [
+var testArgs = [
   [null, null],
   [undefined, null],
   ["", null],
   [42, "42"],
   ["abc", "abc"],
   ["<b>xyz<\/b>", "<b>xyz<\/b>"],
   ["d\0e", "d\0e"]
   // XXX unpaired surrogate?
 ]
-arguments.forEach(function(aValue) {
+testArgs.forEach(function(aValue) {
   var argument = aValue[0], expectation = aValue[1]
   var check = function(aElementOrDocumentFragment) {
     if (expectation === null) {
       assert_equals(aElementOrDocumentFragment.textContent, "")
       assert_equals(aElementOrDocumentFragment.firstChild, null)
     } else {
       assert_equals(aElementOrDocumentFragment.textContent, expectation)
       assert_equals(aElementOrDocumentFragment.childNodes.length, 1,