Bug 1450383 [wpt PR 10261] - Fix broken Pointer Lock IDL tests, a=testonly
authorPhilip Jägenstedt <philip@foolip.org>
Wed, 06 Jun 2018 15:59:15 +0000
changeset 806588 9e02883f1f8add8c91befa81aac6a429e844343c
parent 806587 028b553d5bbf01a6462755a80b7ae2391b53e0f6
child 806589 2544a9eeb993026e9cd8306d31452b689ff87183
push id112908
push userbmo:gl@mozilla.com
push dateMon, 11 Jun 2018 02:53:29 +0000
reviewerstestonly
bugs1450383, 10261
milestone62.0a1
Bug 1450383 [wpt PR 10261] - Fix broken Pointer Lock IDL tests, a=testonly Automatic update from web-platform-testsFix broken Pointer Lock IDL tests (#10261) -- wpt-commits: c54825a23c70b056897b6225495241aa1ea3ec75 wpt-pr: 10261
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/pointerlock/idlharness.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -591506,17 +591506,17 @@
    "936e9101b80d75c3f0518fce8ef5e1f358da0a71",
    "support"
   ],
   "pointerlock/constructor.html": [
    "6b77dd2bd357f9e902846b9f96059537dda35b3e",
    "testharness"
   ],
   "pointerlock/idlharness.html": [
-   "c2def90f67a355efc490ace9a27d873b87edb531",
+   "0d822320837b64c480e32e5110cf0f00adaf570c",
    "testharness"
   ],
   "pointerlock/movementX_Y_basic-manual.html": [
    "45eea8be5393873e6c02331b4aff6f4622be692f",
    "manual"
   ],
   "pointerlock/movementX_Y_no-jumps-manual.html": [
    "0d92e1e270e9ab01c863815c07a02ff3081aede9",
--- a/testing/web-platform/tests/pointerlock/idlharness.html
+++ b/testing/web-platform/tests/pointerlock/idlharness.html
@@ -11,39 +11,17 @@
 <script src="/resources/testharnessreport.js"></script>
 <script src="/resources/WebIDLParser.js"></script>
 <script src="/resources/idlharness.js"></script>
 </head>
 
 <body>
 <h1>Pointer Lock IDL tests</h1>
 
-<pre id='untested_idl' style='display:none'>
-
-interface EventTarget {
-};
-
-interface Node : EventTarget {
-};
-
-interface Element : Node {
-};
-
-interface Document : Node {
-};
-
-interface Event {
-};
-
-interface MouseEvent : Event {
-};
-</pre>
-
 <pre id='idl'>
-
 partial interface Element {
     void requestPointerLock ();
 };
 
 partial interface Document {
                 attribute EventHandler onpointerlockchange;
                 attribute EventHandler onpointerlockerror;
     readonly    attribute Element?     pointerLockElement;
@@ -54,32 +32,39 @@ partial interface MouseEvent {
     readonly    attribute long movementX;
     readonly    attribute long movementY;
 };
 
 partial dictionary MouseEventInit {
         long movementX = 0;
         long movementY = 0;
 };
-
-
 </pre>
 
 <div id="log"></div>
 
 <script>
-
-var idl_array = new IdlArray();
+"use strict";
 
-setup(function() {
-	idl_array.add_untested_idls(document.getElementById("untested_idl").textContent);
-	idl_array.add_idls(document.getElementById("idl").textContent);
+promise_test(async () => {
+    const idl_array = new IdlArray();
+    const uievents = await fetch('/interfaces/uievents.idl').then(r => r.text());
+    const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
+    const html = await fetch('/interfaces/html.idl').then(r => r.text());
 
-	idl_array.add_objects({ Document: ["window.document"],
-                            Element: ["window.document.documentElement"],
-                            MouseEvent: ["new MouseEvent('mousemove')", "new MouseEvent('pointerlockchange')"] });
+	idl_array.add_idls(document.getElementById("idl").textContent);
+    idl_array.add_dependency_idls(uievents);
+    idl_array.add_dependency_idls(dom);
+    idl_array.add_dependency_idls(html);
+
+	idl_array.add_objects({
+        Document: ["window.document"],
+        Element: ["window.document.documentElement"],
+        MouseEvent: [
+            "new MouseEvent('mousemove')",
+            "new MouseEvent('pointerlockchange')"
+        ],
+    });
+    idl_array.test();
 });
-
-idl_array.test();
-
 </script>
 </body>
 </html>