From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- .../web-platform/tests/performance-timeline/OWNERS | 3 + .../performance-timeline/case-sensitivity.html | 39 ++++++++++ .../tests/performance-timeline/idlharness.html | 85 +++++++++++++++++++++ .../performance-timeline/performanceobservers.js | 21 +++++ .../tests/performance-timeline/po-disconnect.html | 44 +++++++++++ .../tests/performance-timeline/po-getentries.html | 50 ++++++++++++ .../performance-timeline/po-mark-measure.html | 72 +++++++++++++++++ .../tests/performance-timeline/po-navigation.html | 28 +++++++ .../tests/performance-timeline/po-observe.html | 58 ++++++++++++++ .../tests/performance-timeline/po-resource.html | 48 ++++++++++++ .../performance-timeline/resources/square.png | Bin 0 -> 249 bytes 11 files changed, 448 insertions(+) create mode 100644 testing/web-platform/tests/performance-timeline/OWNERS create mode 100644 testing/web-platform/tests/performance-timeline/case-sensitivity.html create mode 100644 testing/web-platform/tests/performance-timeline/idlharness.html create mode 100644 testing/web-platform/tests/performance-timeline/performanceobservers.js create mode 100644 testing/web-platform/tests/performance-timeline/po-disconnect.html create mode 100644 testing/web-platform/tests/performance-timeline/po-getentries.html create mode 100644 testing/web-platform/tests/performance-timeline/po-mark-measure.html create mode 100644 testing/web-platform/tests/performance-timeline/po-navigation.html create mode 100644 testing/web-platform/tests/performance-timeline/po-observe.html create mode 100644 testing/web-platform/tests/performance-timeline/po-resource.html create mode 100644 testing/web-platform/tests/performance-timeline/resources/square.png (limited to 'testing/web-platform/tests/performance-timeline') diff --git a/testing/web-platform/tests/performance-timeline/OWNERS b/testing/web-platform/tests/performance-timeline/OWNERS new file mode 100644 index 000000000..56997198b --- /dev/null +++ b/testing/web-platform/tests/performance-timeline/OWNERS @@ -0,0 +1,3 @@ +@plehegar +@igrigorik +@toddreifsteck diff --git a/testing/web-platform/tests/performance-timeline/case-sensitivity.html b/testing/web-platform/tests/performance-timeline/case-sensitivity.html new file mode 100644 index 000000000..99ef66cce --- /dev/null +++ b/testing/web-platform/tests/performance-timeline/case-sensitivity.html @@ -0,0 +1,39 @@ + + +PerformanceTimeline: case sensitivity + + +

PerformanceTimeline: case sensitivity

+
+ diff --git a/testing/web-platform/tests/performance-timeline/idlharness.html b/testing/web-platform/tests/performance-timeline/idlharness.html new file mode 100644 index 000000000..0500b3eee --- /dev/null +++ b/testing/web-platform/tests/performance-timeline/idlharness.html @@ -0,0 +1,85 @@ + + + + +Performance Timeline IDL tests + + + + + + + + + + +

Performance Timeline IDL tests

+
+ + + +
+[Exposed=(Window,Worker)]
+interface PerformanceEntry {
+    readonly attribute DOMString           name;
+    readonly attribute DOMString           entryType;
+    readonly attribute DOMHighResTimeStamp startTime;
+    readonly attribute DOMHighResTimeStamp duration;
+    serializer = {attribute};
+};
+
+dictionary PerformanceEntryFilterOptions {
+    DOMString name;
+    DOMString entryType;
+    DOMString initiatorType;
+};
+
+partial interface Performance {
+    PerformanceEntryList getEntries(optional PerformanceEntryFilterOptions filter);
+    PerformanceEntryList getEntriesByType(DOMString type);
+    PerformanceEntryList getEntriesByName(DOMString name,
+                                          optional DOMString type);
+};
+
+typedef sequence <PerformanceEntry> PerformanceEntryList;
+
+dictionary PerformanceObserverInit {
+    required sequence<DOMString> entryTypes;
+};
+
+[Exposed=(Window,Worker)]
+interface PerformanceObserverEntryList {
+    PerformanceEntryList getEntries(optional PerformanceEntryFilterOptions filter);
+    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();
+};
+
+ + + + diff --git a/testing/web-platform/tests/performance-timeline/performanceobservers.js b/testing/web-platform/tests/performance-timeline/performanceobservers.js new file mode 100644 index 000000000..08587694e --- /dev/null +++ b/testing/web-platform/tests/performance-timeline/performanceobservers.js @@ -0,0 +1,21 @@ +// Compares a performance entry to a predefined one +// perfEntriesToCheck is an array of performance entries from the user agent +// expectedEntries is an array of performance entries minted by the test +function checkEntries(perfEntriesToCheck, expectedEntries) { + function findMatch(pe) { + // we match based on entryType and name + for (var i = expectedEntries.length - 1; i >= 0; i--) { + var ex = expectedEntries[i]; + if (ex.entryType === pe.entryType && ex.name === pe.name) { + return ex; + } + } + return null; + } + + assert_equals(perfEntriesToCheck.length, expectedEntries.length, "performance entries must match"); + + perfEntriesToCheck.forEach(function (pe1) { + assert_not_equals(findMatch(pe1), null, "Entry matches"); + }); +} diff --git a/testing/web-platform/tests/performance-timeline/po-disconnect.html b/testing/web-platform/tests/performance-timeline/po-disconnect.html new file mode 100644 index 000000000..dff39cfaa --- /dev/null +++ b/testing/web-platform/tests/performance-timeline/po-disconnect.html @@ -0,0 +1,44 @@ + + +PerformanceObservers: disconnect + + + +

PerformanceObservers: disconnect

+
+ diff --git a/testing/web-platform/tests/performance-timeline/po-getentries.html b/testing/web-platform/tests/performance-timeline/po-getentries.html new file mode 100644 index 000000000..556209df6 --- /dev/null +++ b/testing/web-platform/tests/performance-timeline/po-getentries.html @@ -0,0 +1,50 @@ + + +PerformanceObservers: getEntries* + + + +

PerformanceObservers: getEntries*

+

+getEntries, getEntriesByType and getEntriesByName work +

+
+ diff --git a/testing/web-platform/tests/performance-timeline/po-mark-measure.html b/testing/web-platform/tests/performance-timeline/po-mark-measure.html new file mode 100644 index 000000000..7455c0e87 --- /dev/null +++ b/testing/web-platform/tests/performance-timeline/po-mark-measure.html @@ -0,0 +1,72 @@ + + +PerformanceObservers: mark and measure + + + +

PerformanceObservers: mark and measure

+

+Performance.mark() and Performance.measure() will queue a PerformanceEntry. +

+
+ diff --git a/testing/web-platform/tests/performance-timeline/po-navigation.html b/testing/web-platform/tests/performance-timeline/po-navigation.html new file mode 100644 index 000000000..ba3af6495 --- /dev/null +++ b/testing/web-platform/tests/performance-timeline/po-navigation.html @@ -0,0 +1,28 @@ + + +PerformanceObservers: navigation + + + +

PerformanceObservers: navigation

+

+Navigation will queue a PerformanceEntry. +

+
+ diff --git a/testing/web-platform/tests/performance-timeline/po-observe.html b/testing/web-platform/tests/performance-timeline/po-observe.html new file mode 100644 index 000000000..84edea84e --- /dev/null +++ b/testing/web-platform/tests/performance-timeline/po-observe.html @@ -0,0 +1,58 @@ + + +PerformanceObservers: observe + + + +

PerformanceObservers: observe

+
+ diff --git a/testing/web-platform/tests/performance-timeline/po-resource.html b/testing/web-platform/tests/performance-timeline/po-resource.html new file mode 100644 index 000000000..00c173eea --- /dev/null +++ b/testing/web-platform/tests/performance-timeline/po-resource.html @@ -0,0 +1,48 @@ + + +PerformanceObservers: resource + + + +

PerformanceObservers: resource

+

+New resources will queue a PerformanceEntry. +

+
+ diff --git a/testing/web-platform/tests/performance-timeline/resources/square.png b/testing/web-platform/tests/performance-timeline/resources/square.png new file mode 100644 index 000000000..be211bc37 Binary files /dev/null and b/testing/web-platform/tests/performance-timeline/resources/square.png differ -- cgit v1.2.3