Bug 1468342 [wpt PR 11475] - Remove array destructuring for WebDriver execute async script tests, a=testonly
authorJim Evans <james.h.evans.jr@gmail.com>
Fri, 06 Jul 2018 15:29:48 +0000
changeset 425833 370f0f30b5640def6b803412306cb23d18522986
parent 425832 2517678e9a4b55fcde1f7c83c021e06b4c1b57ab
child 425834 cb900853bddcf6a41974f6f9a43805d4a2051631
push id34267
push userrgurzau@mozilla.com
push dateWed, 11 Jul 2018 22:05:21 +0000
treeherdermozilla-central@3aca103e4915 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1468342, 11475
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1468342 [wpt PR 11475] - Remove array destructuring for WebDriver execute async script tests, a=testonly Automatic update from web-platform-testsRemove array destructuring for WebDriver execute async script tests IE does not support array destructuring in a `let` statement. This commit allows the execute_async_script tests for collections to run on IE 11. -- wpt-commits: c81e3488e59040bb218fcd56ca00e7fe802534c4 wpt-pr: 11475
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/webdriver/tests/execute_async_script/collections.py
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -620891,17 +620891,17 @@
    "92a8270de9036fb131f72197171237dd3e6e9538",
    "wdspec"
   ],
   "webdriver/tests/execute_async_script/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/execute_async_script/collections.py": [
-   "d6c95dfdcbfc3b9cf91cf6f943a17b7cd0fee79d",
+   "f88643f6266714b078d161ee5039c689a937e0a3",
    "wdspec"
   ],
   "webdriver/tests/execute_async_script/user_prompts.py": [
    "900c47893fa2f506fc8275338c540725b5c3f2a6",
    "wdspec"
   ],
   "webdriver/tests/execute_script/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
--- a/testing/web-platform/tests/webdriver/tests/execute_async_script/collections.py
+++ b/testing/web-platform/tests/webdriver/tests/execute_async_script/collections.py
@@ -11,44 +11,44 @@ def execute_async_script(session, script
 
     return session.transport.send(
         "POST", "/session/{session_id}/execute/async".format(**vars(session)),
         body)
 
 
 def test_arguments(session):
     response = execute_async_script(session, """
-        let [resolve] = arguments;
+        let resolve = arguments[0];
         function func() {
             return arguments;
         }
         resolve(func("foo", "bar"));
         """)
     assert_success(response, [u"foo", u"bar"])
 
 
 def test_array(session):
     response = execute_async_script(session, """
-        let [resolve] = arguments;
+        let resolve = arguments[0];
         resolve([1, 2]);
         """)
     assert_success(response, [1, 2])
 
 
 def test_file_list(session, tmpdir):
     files = [tmpdir.join("foo.txt"), tmpdir.join("bar.txt")]
 
     session.url = inline("<input type=file multiple>")
     upload = session.find.css("input", all=False)
     for file in files:
         file.write("morn morn")
         upload.send_keys(str(file))
 
     response = execute_async_script(session, """
-        let [resolve] = arguments;
+        let resolve = arguments[0];
         resolve(document.querySelector('input').files);
         """)
     value = assert_success(response)
     assert isinstance(value, list)
     assert len(value) == len(files)
     for expected, actual in zip(files, value):
         assert isinstance(actual, dict)
         assert "name" in actual
@@ -62,17 +62,17 @@ def test_html_all_collection(session):
         <p>bar
         """)
     html = session.find.css("html", all=False)
     head = session.find.css("head", all=False)
     body = session.find.css("body", all=False)
     ps = session.find.css("p")
 
     response = execute_async_script(session, """
-        let [resolve] = arguments;
+        let resolve = arguments[0];
         resolve(document.all);
         """)
     value = assert_success(response)
     assert isinstance(value, list)
     # <html>, <head>, <body>, <p>, <p>
     assert len(value) == 5
 
     assert_same_element(session, html, value[0])
@@ -85,17 +85,17 @@ def test_html_all_collection(session):
 def test_html_collection(session):
     session.url = inline("""
         <p>foo
         <p>bar
         """)
     ps = session.find.css("p")
 
     response = execute_async_script(session, """
-        let [resolve] = arguments;
+        let resolve = arguments[0];
         resolve(document.getElementsByTagName('p'));
         """)
     value = assert_success(response)
     assert isinstance(value, list)
     assert len(value) == 2
     for expected, actual in zip(ps, value):
         assert_same_element(session, expected, actual)
 
@@ -105,17 +105,17 @@ def test_html_form_controls_collection(s
         <form>
             <input>
             <input>
         </form>
         """)
     inputs = session.find.css("input")
 
     response = execute_async_script(session, """
-        let [resolve] = arguments;
+        let resolve = arguments[0];
         resolve(document.forms[0].elements);
         """)
     value = assert_success(response)
     assert isinstance(value, list)
     assert len(value) == 2
     for expected, actual in zip(inputs, value):
         assert_same_element(session, expected, actual)
 
@@ -125,17 +125,17 @@ def test_html_options_collection(session
         <select>
             <option>
             <option>
         </select>
         """)
     options = session.find.css("option")
 
     response = execute_async_script(session, """
-        let [resolve] = arguments;
+        let resolve = arguments[0];
         resolve(document.querySelector('select').options);
         """)
     value = assert_success(response)
     assert isinstance(value, list)
     assert len(value) == 2
     for expected, actual in zip(options, value):
         assert_same_element(session, expected, actual)
 
@@ -143,16 +143,16 @@ def test_html_options_collection(session
 def test_node_list(session):
     session.url = inline("""
         <p>foo
         <p>bar
         """)
     ps = session.find.css("p")
 
     response = execute_async_script(session, """
-        let [resolve] = arguments;
+        let resolve = arguments[0];
         resolve(document.querySelectorAll('p'));
         """)
     value = assert_success(response)
     assert isinstance(value, list)
     assert len(value) == 2
     for expected, actual in zip(ps, value):
         assert_same_element(session, expected, actual)