Unreviewed. Update W3C WebDriver imported tests.
[WebKit-https.git] / WebDriverTests / imported / w3c / webdriver / interface / interface.html
1 <!DOCTYPE html>
2 <body>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script src=/resources/WebIDLParser.js></script>
6 <script src=/resources/idlharness.js></script>
7 <script type=text/plain class=untested>
8 [Exposed=Window]
9 interface Navigator {
10   // objects implementing this interface also implement the interfaces given below
11 };
12 </script>
13 <script type=text/plain>
14 Navigator implements NavigatorAutomationInformation;
15
16 [NoInterfaceObject,
17  Exposed=(Window)]
18 interface NavigatorAutomationInformation {
19     readonly attribute boolean webdriver;
20     // always returns true
21 };
22 </script>
23 <script>
24 "use strict";
25
26 if ("webdriver" in navigator) {
27   test(() => assert_true(navigator.webdriver), "navigator.webdriver is always true");
28   var idlArray = new IdlArray();
29   [].forEach.call(document.querySelectorAll("script[type=text\\/plain]"), function(node) {
30     if (node.className == "untested") {
31       idlArray.add_untested_idls(node.textContent);
32     } else {
33       idlArray.add_idls(node.textContent);
34     }
35   });
36   idlArray.test();
37 } else {
38   done();
39 }
40 </script>