Bug 1474408 [wpt PR 11862] - Update the hr-time IDL file, a=testonly
authorLuke Bjerring <lukebjerring@users.noreply.github.com>
Mon, 06 Aug 2018 17:16:09 +0000
changeset 485749 a64611d76fc8e64ba14baa555363341b70efc934
parent 485748 435f12f169195fa7f82d59d1ec3bea51398a3de2
child 485750 cecc5af78bd7eb290ed597064dfb20ff43c394cf
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1474408, 11862
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 1474408 [wpt PR 11862] - Update the hr-time IDL file, a=testonly Automatic update from web-platform-testsUpdate the hr-time IDL file + test (#11862) -- wpt-commits: 0bf08b6c2bc6a13f606b58895bc95f7276a45a54 wpt-pr: 11862
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/hr-time/idlharness.any.js
testing/web-platform/tests/hr-time/idlharness.html
testing/web-platform/tests/interfaces/hr-time.idl
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -349414,19 +349414,31 @@
      "/hr-time/basic.any.html",
      {}
     ],
     [
      "/hr-time/basic.any.worker.html",
      {}
     ]
    ],
-   "hr-time/idlharness.html": [
-    [
-     "/hr-time/idlharness.html",
+   "hr-time/idlharness.any.js": [
+    [
+     "/hr-time/idlharness.any.html",
+     {}
+    ],
+    [
+     "/hr-time/idlharness.any.sharedworker.html",
+     {}
+    ],
+    [
+     "/hr-time/idlharness.any.worker.html",
+     {}
+    ],
+    [
+     "/hr-time/idlharness.https.any.serviceworker.html",
      {}
     ]
    ],
    "hr-time/monotonic-clock.any.js": [
     [
      "/hr-time/monotonic-clock.any.html",
      {}
     ],
@@ -583677,18 +583689,18 @@
   "hr-time/META.yml": [
    "2be354920aa140a72bc62ea2273f5d975eab8d46",
    "support"
   ],
   "hr-time/basic.any.js": [
    "364dd81a3448188bd76f6ff410807bfcca93177d",
    "testharness"
   ],
-  "hr-time/idlharness.html": [
-   "d28cee3a70014bf5cc1c02b3cc211ae75c2a37c4",
+  "hr-time/idlharness.any.js": [
+   "4e266c09e3358034e6fac6fb282bbeb138e4278a",
    "testharness"
   ],
   "hr-time/monotonic-clock.any.js": [
    "f7f254557f4296f8e69757eb9ed3ac11a05d3a33",
    "testharness"
   ],
   "hr-time/performance-tojson.html": [
    "fd8049cb9a1eeedef260d2af048540362f47f183",
@@ -602470,17 +602482,17 @@
    "b91eb649c7eb3915d95c29f3ae9456847cb611cb",
    "support"
   ],
   "interfaces/gyroscope.idl": [
    "66303fe283317ec9200ec50f19b1109eeec7269b",
    "support"
   ],
   "interfaces/hr-time.idl": [
-   "3c793c328c6129edc37a83eddaa128a1dd023dcd",
+   "ca15cf8c44371fae17dc8fd162ebfbc9a0500e7c",
    "support"
   ],
   "interfaces/html-media-capture.idl": [
    "a398330775cfcf85640fdad39646fbbc77d3fffa",
    "support"
   ],
   "interfaces/html.idl": [
    "fa3cd4f56ac2c1b7eb60eeb3cc172e8854a165ba",
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/hr-time/idlharness.any.js
@@ -0,0 +1,22 @@
+// META: global=window,worker
+// META: script=/resources/WebIDLParser.js
+// META: script=/resources/idlharness.js
+
+'use strict';
+
+// https://w3c.github.io/hr-time/
+
+idl_test(
+  ['hr-time'],
+  ['html', 'dom'],
+  async idl_array => {
+    if (self.GLOBAL.isWorker()) {
+      idl_array.add_objects({ WorkerGlobalScope: ['self'] });
+    } else {
+      idl_array.add_objects({ Window: ['self'] });
+    }
+    idl_array.add_objects({
+      Performance: ['performance'],
+    });
+  }
+);
deleted file mode 100644
--- a/testing/web-platform/tests/hr-time/idlharness.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>High Resolution Time IDL tests</title>
-<link rel="author" title="W3C" href="http://www.w3.org/" />
-<link rel="help" href="http://www.w3.org/TR/hr-time/#sec-extenstions-performance-interface"/>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/WebIDLParser.js"></script>
-<script src="/resources/idlharness.js"></script>
-</head>
-<body>
-<h1>High Resolution Time IDL tests</h1>
-<div id="log"></div>
-<script>
-'use strict';
-
-function doTest([dom, html, hr_time]) {
-  var idl_array = new IdlArray();
-  idl_array.add_untested_idls(dom, { only: ['EventTarget'] });
-  idl_array.add_untested_idls(html, { only: ['WindowOrWorkerGlobalScope'] });
-  idl_array.add_idls(hr_time);
-  idl_array.add_objects({
-    Performance: ["window.performance"],
-    Window: ["window"],
-  });
-  idl_array.test();
-}
-
-function fetchText(url) {
-  return fetch(url).then((response) => response.text());
-}
-
-promise_test(() => {
-  return Promise.all(['/interfaces/dom.idl',
-                      '/interfaces/html.idl',
-                      '/interfaces/hr-time.idl'].map(fetchText))
-                .then(doTest);
-}, 'Test driver');
-</script>
-</body>
-</html>
--- a/testing/web-platform/tests/interfaces/hr-time.idl
+++ b/testing/web-platform/tests/interfaces/hr-time.idl
@@ -1,17 +1,18 @@
 // GENERATED CONTENT - DO NOT EDIT
-// Content of this file was automatically extracted from the High Resolution Time spec.
-// See https://w3c.github.io/hr-time/
+// Content of this file was automatically extracted from the
+// "High Resolution Time Level 2" spec.
+// See: https://w3c.github.io/hr-time/
 
 typedef double DOMHighResTimeStamp;
 
 [Exposed=(Window,Worker)]
 interface Performance : EventTarget {
-    DOMHighResTimeStamp now ();
+    DOMHighResTimeStamp now();
     readonly attribute DOMHighResTimeStamp timeOrigin;
     [Default] object toJSON();
 };
 
-partial interface WindowOrWorkerGlobalScope {
+partial interface mixin WindowOrWorkerGlobalScope {
     [Replaceable]
     readonly    attribute Performance performance;
 };