Bug 1468835 [wpt PR 9837] - Update the user-timing IDL file, a=testonly
authorLuke Bjerring <lukebjerring@users.noreply.github.com>
Mon, 02 Jul 2018 17:29:10 +0000
changeset 425083 f3cfc4e140d7531fb0e54e057661d98da8681ca1
parent 425082 84a6bcf40bef82586507e95da112743c1dc42b9e
child 425084 3fa1ad011dd59eb388b8cc6b58a8504c0ba69a2f
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
bugs1468835
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 1468835 [wpt PR 9837] - Update the user-timing IDL file, a=testonly Automatic update from web-platform-testsUpdate the performance-timeline and user-timing IDL files (#9837) Adds new any.js tests and removes the old ones. -- wpt-commits: 8cce35711430779302fab1c7f6fda492cd1853a5 wpt-pr: 9837
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/interfaces/performance-timeline.idl
testing/web-platform/tests/interfaces/user-timing.idl
testing/web-platform/tests/performance-timeline/idlharness.any.js
testing/web-platform/tests/performance-timeline/idlharness.html
testing/web-platform/tests/user-timing/idlharness.any.js
testing/web-platform/tests/user-timing/idlharness.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -288234,16 +288234,21 @@
      {}
     ]
    ],
    "interfaces/payment-request.idl": [
     [
      {}
     ]
    ],
+   "interfaces/performance-timeline.idl": [
+    [
+     {}
+    ]
+   ],
    "interfaces/permissions.idl": [
     [
      {}
     ]
    ],
    "interfaces/pointerevents.idl": [
     [
      {}
@@ -288294,16 +288299,21 @@
      {}
     ]
    ],
    "interfaces/url.idl": [
     [
      {}
     ]
    ],
+   "interfaces/user-timing.idl": [
+    [
+     {}
+    ]
+   ],
    "interfaces/vibration.idl": [
     [
      {}
     ]
    ],
    "interfaces/wake-lock.idl": [
     [
      {}
@@ -362902,19 +362912,31 @@
      "/performance-timeline/case-sensitivity.any.html",
      {}
     ],
     [
      "/performance-timeline/case-sensitivity.any.worker.html",
      {}
     ]
    ],
-   "performance-timeline/idlharness.html": [
-    [
-     "/performance-timeline/idlharness.html",
+   "performance-timeline/idlharness.any.js": [
+    [
+     "/performance-timeline/idlharness.any.html",
+     {}
+    ],
+    [
+     "/performance-timeline/idlharness.any.sharedworker.html",
+     {}
+    ],
+    [
+     "/performance-timeline/idlharness.any.worker.html",
+     {}
+    ],
+    [
+     "/performance-timeline/idlharness.https.any.serviceworker.html",
      {}
     ]
    ],
    "performance-timeline/performanceentry-tojson.html": [
     [
      "/performance-timeline/performanceentry-tojson.html",
      {}
     ]
@@ -377168,19 +377190,31 @@
      "/user-timing/entry_type.any.html",
      {}
     ],
     [
      "/user-timing/entry_type.any.worker.html",
      {}
     ]
    ],
-   "user-timing/idlharness.html": [
-    [
-     "/user-timing/idlharness.html",
+   "user-timing/idlharness.any.js": [
+    [
+     "/user-timing/idlharness.any.html",
+     {}
+    ],
+    [
+     "/user-timing/idlharness.any.sharedworker.html",
+     {}
+    ],
+    [
+     "/user-timing/idlharness.any.worker.html",
+     {}
+    ],
+    [
+     "/user-timing/idlharness.https.any.serviceworker.html",
      {}
     ]
    ],
    "user-timing/invoke_with_timing_attributes.html": [
     [
      "/user-timing/invoke_with_timing_attributes.html",
      {}
     ]
@@ -588691,16 +588725,20 @@
   "interfaces/payment-handler.idl": [
    "6d9157e515e419c7a2fffc61a1f8e3b23a4550ba",
    "support"
   ],
   "interfaces/payment-request.idl": [
    "594179265efe3f056059ba834da5e1873c3e6174",
    "support"
   ],
+  "interfaces/performance-timeline.idl": [
+   "57f26fe863d12c7672905d185e9a2c7ab9cb98a0",
+   "support"
+  ],
   "interfaces/permissions.idl": [
    "7fec46d25cf175390524b681cdbec7b0b76c89b9",
    "support"
   ],
   "interfaces/pointerevents.idl": [
    "29ca4e05813256592af7e9804e8135aaffdcc995",
    "support"
   ],
@@ -588739,16 +588777,20 @@
   "interfaces/uievents.idl": [
    "9e107e1ac2ed7195f802291f1d3827c53468a002",
    "support"
   ],
   "interfaces/url.idl": [
    "416ee65b3ba9e438a3178c6c04a414f42d759fc8",
    "support"
   ],
+  "interfaces/user-timing.idl": [
+   "41c00eec8e9c1b2137bd05e85bdc029b7a87c349",
+   "support"
+  ],
   "interfaces/vibration.idl": [
    "d1f3f51b0c6a46958d4bb3e9cc8bbc85e8a74512",
    "support"
   ],
   "interfaces/wake-lock.idl": [
    "7d0ee3d60a923bf454e18f9116cded1cc3a16f9b",
    "support"
   ],
@@ -598871,18 +598913,18 @@
   "performance-timeline/OWNERS": [
    "b82f9756b15ef3ea45fb250e304031d9ceaee9c7",
    "support"
   ],
   "performance-timeline/case-sensitivity.any.js": [
    "9c6b6edf19800a2730de2dfe601a7cd2503cf87d",
    "testharness"
   ],
-  "performance-timeline/idlharness.html": [
-   "d6ce8e5c21b42843caea8e61c1637d75c2e51d64",
+  "performance-timeline/idlharness.any.js": [
+   "0a3ea0b532a1634008b776489b7409b348952d6f",
    "testharness"
   ],
   "performance-timeline/performanceentry-tojson.html": [
    "bc8a6f3fb13af9df11781a21b96f342e7d7ddf4e",
    "testharness"
   ],
   "performance-timeline/performanceobservers.js": [
    "0faeecf506da5b8a5c722a1ce8c7b5854227bca0",
@@ -617143,18 +617185,18 @@
   "user-timing/clear_one_measure.any.js": [
    "6759560cec2edbefa2e552ba86a0336d9d2274e7",
    "testharness"
   ],
   "user-timing/entry_type.any.js": [
    "bb08ac2ee06bc12e75cc44b76f06d3f0262f44ba",
    "testharness"
   ],
-  "user-timing/idlharness.html": [
-   "b24d4d5faf5df5d67135560d5fe362cc6d72c28f",
+  "user-timing/idlharness.any.js": [
+   "6a0dcd26b5ff16b18603c50b9257d55e6e25f0ce",
    "testharness"
   ],
   "user-timing/invoke_with_timing_attributes.html": [
    "05283be9a7230ba0c4af09fb5dac98d828bfaf2e",
    "testharness"
   ],
   "user-timing/invoke_with_timing_attributes.worker.js": [
    "f86e2132ced139cfe712a20ee4f64ba9e44459d2",
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/interfaces/performance-timeline.idl
@@ -0,0 +1,40 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content of this file was automatically extracted from the
+// "Performance Timeline Level 2" spec.
+// See: https://w3c.github.io/performance-timeline/
+
+partial interface Performance {
+    PerformanceEntryList getEntries();
+    PerformanceEntryList getEntriesByType(DOMString type);
+    PerformanceEntryList getEntriesByName(DOMString name,
+                                          optional DOMString type);
+};
+typedef sequence<PerformanceEntry> PerformanceEntryList;
+[Exposed=(Window,Worker)]
+interface PerformanceEntry {
+    readonly attribute DOMString           name;
+    readonly attribute DOMString           entryType;
+    readonly attribute DOMHighResTimeStamp startTime;
+    readonly attribute DOMHighResTimeStamp duration;
+    [Default] object toJSON();
+};
+callback PerformanceObserverCallback = void (PerformanceObserverEntryList entries,
+                                             PerformanceObserver observer);
+[Constructor(PerformanceObserverCallback callback),
+ Exposed=(Window,Worker)]
+interface PerformanceObserver {
+    void                 observe(PerformanceObserverInit options);
+    void                 disconnect();
+    PerformanceEntryList takeRecords();
+};
+dictionary PerformanceObserverInit {
+    required sequence<DOMString> entryTypes;
+             boolean             buffered = false;
+};
+[Exposed=(Window,Worker)]
+interface PerformanceObserverEntryList {
+    PerformanceEntryList getEntries();
+    PerformanceEntryList getEntriesByType(DOMString type);
+    PerformanceEntryList getEntriesByName(DOMString name,
+                                          optional DOMString type);
+};
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/interfaces/user-timing.idl
@@ -0,0 +1,19 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content of this file was automatically extracted from the
+// "User Timing Level 2" spec.
+// See: https://w3c.github.io/user-timing/
+
+partial interface Performance {
+    void mark(DOMString markName);
+    void clearMarks(optional DOMString markName);
+    void measure(DOMString measureName,
+                 optional DOMString startMark,
+                 optional DOMString endMark);
+    void clearMeasures(optional DOMString measureName);
+};
+[Exposed=(Window,Worker)]
+interface PerformanceMark : PerformanceEntry {
+};
+[Exposed=(Window,Worker)]
+interface PerformanceMeasure : PerformanceEntry {
+};
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/performance-timeline/idlharness.any.js
@@ -0,0 +1,26 @@
+// META: global=window,worker
+// META: script=/resources/WebIDLParser.js
+// META: script=/resources/idlharness.js
+
+// https://w3c.github.io/performance-timeline/
+
+'use strict';
+
+promise_test(async () => {
+  const idl_array = new IdlArray();
+  const idl = await fetch("/interfaces/performance-timeline.idl").then(r => r.text());
+  const dom = await fetch("/interfaces/dom.idl").then(r => r.text());
+  const hrtime = await fetch("/interfaces/hr-time.idl").then(r => r.text());
+
+  // create first mark
+  self.performance.mark("mark");
+
+  idl_array.add_idls(idl);
+  idl_array.add_dependency_idls(hrtime);
+  idl_array.add_dependency_idls(dom);
+  idl_array.add_objects({
+    Performance: ["performance"],
+    PerformanceMark: [self.performance.getEntriesByName("mark")[0]],
+  });
+  idl_array.test();
+}, "Test IDL implementation of performance-timeline API");
deleted file mode 100644
--- a/testing/web-platform/tests/performance-timeline/idlharness.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>Performance Timeline IDL tests</title>
-<link rel="author" title="W3C" href="http://www.w3.org/" />
-<link rel="help" href="http://www.w3.org/TR/performance-timeline/#performanceentry"/>
-<link rel="help" href="http://www.w3.org/TR/performance-timeline/#performance"/>
-<link rel="help" href="http://www.w3.org/TR/performance-timeline/#performanceentrylist"/>
-<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>Performance Timeline IDL tests</h1>
-<div id="log"></div>
-
-<pre id='untested_idl' style='display:none'>
-interface Performance {
-};
-
-typedef double DOMHighResTimeStamp;
-
-[Exposed=(Window,Worker)]
-interface PerformanceMark : PerformanceEntry {
-};
-</pre>
-
-<pre id='idl'>
-[Exposed=(Window,Worker)]
-interface PerformanceEntry {
-    readonly attribute DOMString           name;
-    readonly attribute DOMString           entryType;
-    readonly attribute DOMHighResTimeStamp startTime;
-    readonly attribute DOMHighResTimeStamp duration;
-    [Default] object toJSON();
-};
-
-partial interface Performance {
-    PerformanceEntryList getEntries();
-    PerformanceEntryList getEntriesByType(DOMString type);
-    PerformanceEntryList getEntriesByName(DOMString name,
-                                          optional DOMString type);
-};
-
-typedef sequence &lt;PerformanceEntry> PerformanceEntryList;
-
-dictionary PerformanceObserverInit {
-    required sequence&lt;DOMString> entryTypes;
-    boolean             buffered = false;
-};
-
-[Exposed=(Window,Worker)]
-interface PerformanceObserverEntryList {
-    PerformanceEntryList getEntries();
-    PerformanceEntryList getEntriesByType(DOMString type);
-    PerformanceEntryList getEntriesByName(DOMString name,
-                                          optional DOMString type);
-};
-
-callback PerformanceObserverCallback = void (PerformanceObserverEntryList entries,
-                                             PerformanceObserver observer);
-
-[Constructor(PerformanceObserverCallback callback),
- Exposed=(Window,Worker)]
-interface PerformanceObserver {
-    void observe(PerformanceObserverInit options);
-    void disconnect();
-    PerformanceEntryList takeRecords();
-};
-</pre>
-
-<script>
-var idl_array;
-setup(function() {
-  idl_array = new IdlArray();
-  idl_array.add_untested_idls(document.getElementById("untested_idl").textContent);
-  idl_array.add_idls(document.getElementById("idl").textContent);
-  // create first mark
-  self.performance.mark("mark");
-  idl_array.add_objects({
-    Performance: ["window.performance"],
-    PerformanceMark: [self.performance.getEntriesByName("mark")[0]]
-  });
-});
-idl_array.test();
-</script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/user-timing/idlharness.any.js
@@ -0,0 +1,24 @@
+// META: global=window,worker
+// META: script=/resources/WebIDLParser.js
+// META: script=/resources/idlharness.js
+
+// https://w3c.github.io/user-timing/
+
+'use strict';
+
+promise_test(async () => {
+  const idl_array = new IdlArray();
+  const idl = await fetch("/interfaces/user-timing.idl").then(r => r.text());
+  const hrtime = await fetch("/interfaces/hr-time.idl").then(r => r.text());
+  const perf = await fetch("/interfaces/performance-timeline.idl").then(r => r.text());
+  const dom = await fetch("/interfaces/dom.idl").then(r => r.text());
+
+  idl_array.add_idls(idl);
+  idl_array.add_dependency_idls(hrtime);
+  idl_array.add_dependency_idls(perf);
+  idl_array.add_dependency_idls(dom);
+  idl_array.add_objects({
+    Performance: ["performance"]
+  });
+  idl_array.test();
+}, "Test IDL implementation of user-timing API");
deleted file mode 100644
--- a/testing/web-platform/tests/user-timing/idlharness.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>User Timing IDL tests</title>
-<link rel="author" title="W3C" href="http://www.w3.org/" />
-<link rel="help" href="http://www.w3.org/TR/user-timing/#extensions-performance-interface"/>
-<link rel="help" href="http://www.w3.org/TR/user-timing/#performancemark"/>
-<link rel="help" href="http://www.w3.org/TR/user-timing/#performancemeasure"/>
-<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>User Timing IDL tests</h1>
-<div id="log"></div>
-
-<pre id='untested_idl' style='display:none'>
-[Exposed=(Window,Worker)]
-interface Performance {
-};
-
-[Exposed=(Window,Worker)]
-interface PerformanceEntry {
-};
-</pre>
-
-<pre id='idl'>
-partial interface Performance {
-    void mark(DOMString markName);
-    void clearMarks(optional  DOMString markName);
-
-    void measure(DOMString measureName, optional DOMString startMark, optional DOMString endMark);
-    void clearMeasures(optional DOMString measureName);
-};
-
-[Exposed=(Window,Worker)]
-interface PerformanceMark : PerformanceEntry {
-};
-
-[Exposed=(Window,Worker)]
-interface PerformanceMeasure : PerformanceEntry {
-};
-
-</pre>
-
-<script>
-
-(function() {
-  var idl_array = new IdlArray();
-
-  idl_array.add_untested_idls(document.getElementById("untested_idl").textContent);
-  idl_array.add_idls(document.getElementById("idl").textContent);
-
-  idl_array.add_objects({Performance: ["window.performance"]});
-
-  idl_array.test();
-})();
-
-</script>
-</body>
-</html>