Bug 1472741 [wpt PR 9851] - Update the webdriver IDL file, a=testonly
authorLuke Bjerring <lukebjerring@users.noreply.github.com>
Mon, 02 Jul 2018 17:46:06 +0000
changeset 425101 fec68c9da3370713e681c13796f713c120b7a8cb
parent 425100 b568f6cd6df40e289e94fcfd4b849dcaf664ecb6
child 425102 5d1a2fc0f89195656cd9d7c12a6c2d89a56a2156
push id34234
push userccoroiu@mozilla.com
push dateThu, 05 Jul 2018 00:14:48 +0000
treeherdermozilla-central@90be04d99fc7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1472741
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 1472741 [wpt PR 9851] - Update the webdriver IDL file, a=testonly Automatic update from web-platform-testswebdriver: update the webdriver WebIDL and fix test (#9851) -- wpt-commits: 418538eb1cce3ecd931285db697736aa2066d05c wpt-pr: 9851
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/interfaces/webdriver.idl
testing/web-platform/tests/webdriver/tests/interface.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -288359,16 +288359,21 @@
      {}
     ]
    ],
    "interfaces/webauthn.idl": [
     [
      {}
     ]
    ],
+   "interfaces/webdriver.idl": [
+    [
+     {}
+    ]
+   ],
    "interfaces/webidl.idl": [
     [
      {}
     ]
    ],
    "interfaces/webrtc-pc.idl": [
     [
      {}
@@ -588912,16 +588917,20 @@
   "interfaces/web-share.idl": [
    "21b54128664c5962c29fd708ebba3d8d90987f26",
    "support"
   ],
   "interfaces/webauthn.idl": [
    "1ae8b428644479b352fd5b1996677fd4dcdbb84b",
    "support"
   ],
+  "interfaces/webdriver.idl": [
+   "6f6ce7d142a9b548988c9ab2a7a13f0f1793cf6a",
+   "support"
+  ],
   "interfaces/webidl.idl": [
    "d466ddd18ed621e15cc416863502069ffccfa5b9",
    "support"
   ],
   "interfaces/webrtc-pc.idl": [
    "a631e2e0ea0f451c64b5d5f74fe7cbeafc231b8e",
    "support"
   ],
@@ -620437,17 +620446,17 @@
    "8d687026889e601f4c1987996f4e5306b0f627f9",
    "wdspec"
   ],
   "webdriver/tests/get_window_rect/user_prompts.py": [
    "c91b4d09f4f76067c159236b016b375c34baa117",
    "wdspec"
   ],
   "webdriver/tests/interface.html": [
-   "f7b2c45ff8b1b5790dd390fbe2ab997766f5d9a8",
+   "0b88587deabc7a4577da90bdf6d874e596b9a240",
    "testharness"
   ],
   "webdriver/tests/is_element_selected/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/is_element_selected/selected.py": [
    "afed5bfc86527410e0fb521f7f75d79bee1fb060",
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/interfaces/webdriver.idl
@@ -0,0 +1,9 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content of this file was automatically extracted from the
+// "WebDriver" spec.
+// See: https://w3c.github.io/webdriver/webdriver-spec.html
+
+Navigator includes NavigatorAutomationInformation;
+interface mixin NavigatorAutomationInformation {
+    readonly attribute boolean webdriver;
+};
--- a/testing/web-platform/tests/webdriver/tests/interface.html
+++ b/testing/web-platform/tests/webdriver/tests/interface.html
@@ -1,49 +1,23 @@
 <!doctype html>
 <meta charset=utf-8>
-
+<link rel="help" href="https://w3c.github.io/webdriver/">
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script src=/resources/WebIDLParser.js></script>
 <script src=/resources/idlharness.js></script>
 
-<script type=text/plain class=untested>
-[Exposed=Window]
-interface Navigator {
-  // objects implementing this interface also implement the interfaces given below
-};
-</script>
-
-<script type=text/plain>
-Navigator includes NavigatorAutomationInformation;
-
-interface mixin NavigatorAutomationInformation {
-  readonly attribute boolean webdriver;
-};
-</script>
-
 <script>
-"use strict";
-
-test(() => assert_idl_attribute(navigator, "webdriver"), "navigator.webdriver is present");
+  "use strict";
 
-// When test is run in automation navigator.webdriver is likely to
-// be true because WebDriver controls the browser instance.  To that
-// extent, this test is a bit special.  It should also be possible to
-// run the test manually, when WebDriver is not active, and so either
-// true/false outcome is OK.
-if (navigator.webdriver) {
-  test(() => assert_true(navigator.webdriver), "navigator.webdriver is true when webdriver-active is set");
-} else {
-  test(() => assert_false(navigator.webdriver), "navigator.webdriver is false when webdriver-active is not set");
-}
-
-var idls = new IdlArray();
-for (let node of [...document.scripts].filter(({type}) => type == "text/plain")) {
-  if (node.className == "untested") {
-    idls.add_untested_idls(node.textContent);
-  } else {
-    idls.add_idls(node.textContent);
-  }
-};
-idls.test();
+  promise_test(async () => {
+    const idl_array = new IdlArray();
+    const idl = await fetch("/interfaces/webdriver.idl").then(r => r.text());
+    const html = await fetch("/interfaces/html.idl").then(r => r.text());
+    idl_array.add_idls(idl);
+    idl_array.add_dependency_idls(html);
+    idl_array.add_objects({
+      Navigator: ["navigator"]
+    });
+    idl_array.test();
+  }, "Test IDL implementation of webdriver API");
 </script>