Performance and PerformanceNavigation interfaces are missing toJSON operations
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Sep 2020 17:07:06 +0000 (17:07 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Sep 2020 17:07:06 +0000 (17:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=216728

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update results now that we pass more subtests.

* web-platform-tests/hr-time/idlharness.any-expected.txt:
* web-platform-tests/hr-time/idlharness.any.worker-expected.txt:
* web-platform-tests/hr-time/performance-tojson-expected.txt:

Source/WebCore:

Add missing toJSON operations to Performance and PerformanceNavigation and update
comments in related IDLs.

Updates results for existing tests, more of which now pass.

* page/Performance.idl:
* page/PerformanceMark.idl:
* page/PerformanceMeasure.idl:
* page/PerformanceNavigation.idl:
* page/PerformanceTiming.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267316 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/hr-time/idlharness.any-expected.txt
LayoutTests/imported/w3c/web-platform-tests/hr-time/idlharness.any.worker-expected.txt
LayoutTests/imported/w3c/web-platform-tests/hr-time/performance-tojson-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/page/Performance.idl
Source/WebCore/page/PerformanceMark.idl
Source/WebCore/page/PerformanceMeasure.idl
Source/WebCore/page/PerformanceNavigation.idl
Source/WebCore/page/PerformanceTiming.idl

index ef15398..518fcce 100644 (file)
@@ -1,5 +1,18 @@
 2020-09-19  Sam Weinig  <weinig@apple.com>
 
+        Performance and PerformanceNavigation interfaces are missing toJSON operations
+        https://bugs.webkit.org/show_bug.cgi?id=216728
+
+        Reviewed by Darin Adler.
+
+        Update results now that we pass more subtests.
+
+        * web-platform-tests/hr-time/idlharness.any-expected.txt:
+        * web-platform-tests/hr-time/idlharness.any.worker-expected.txt:
+        * web-platform-tests/hr-time/performance-tojson-expected.txt:
+
+2020-09-19  Sam Weinig  <weinig@apple.com>
+
         Resync web-platform-tests/hr-time from upstream
         https://bugs.webkit.org/show_bug.cgi?id=216724
 
index 2acae5b..8290c6e 100644 (file)
@@ -19,13 +19,13 @@ PASS Performance interface: existence and properties of interface prototype obje
 PASS Performance interface: existence and properties of interface prototype object's @@unscopables property 
 PASS Performance interface: operation now() 
 FAIL Performance interface: attribute timeOrigin assert_true: The prototype object must have a property "timeOrigin" expected true got false
-FAIL Performance interface: operation toJSON() assert_own_property: interface prototype object missing non-static operation expected property "toJSON" missing
+PASS Performance interface: operation toJSON() 
 PASS Performance must be primary interface of performance 
 PASS Stringification of performance 
 PASS Performance interface: performance must inherit property "now()" with the proper type 
 FAIL Performance interface: performance must inherit property "timeOrigin" with the proper type assert_inherits: property "timeOrigin" not found in prototype chain
-FAIL Performance interface: performance must inherit property "toJSON()" with the proper type assert_inherits: property "toJSON" not found in prototype chain
-FAIL Performance interface: default toJSON operation on performance memberHolderObject.toJSON is not a function. (In 'memberHolderObject.toJSON()', 'memberHolderObject.toJSON' is undefined)
+PASS Performance interface: performance must inherit property "toJSON()" with the proper type 
+FAIL Performance interface: default toJSON operation on performance assert_true: property "timeOrigin" should be present in the output of Performance.prototype.toJSON() expected true got false
 PASS Window interface: attribute performance 
 PASS Window interface: self must inherit property "performance" with the proper type 
 PASS WorkerGlobalScope interface: existence and properties of interface object 
index 7a787d0..2ca3287 100644 (file)
@@ -19,13 +19,13 @@ PASS Performance interface: existence and properties of interface prototype obje
 PASS Performance interface: existence and properties of interface prototype object's @@unscopables property 
 PASS Performance interface: operation now() 
 FAIL Performance interface: attribute timeOrigin assert_true: The prototype object must have a property "timeOrigin" expected true got false
-FAIL Performance interface: operation toJSON() assert_own_property: interface prototype object missing non-static operation expected property "toJSON" missing
+PASS Performance interface: operation toJSON() 
 PASS Performance must be primary interface of performance 
 PASS Stringification of performance 
 PASS Performance interface: performance must inherit property "now()" with the proper type 
 FAIL Performance interface: performance must inherit property "timeOrigin" with the proper type assert_inherits: property "timeOrigin" not found in prototype chain
-FAIL Performance interface: performance must inherit property "toJSON()" with the proper type assert_inherits: property "toJSON" not found in prototype chain
-FAIL Performance interface: default toJSON operation on performance memberHolderObject.toJSON is not a function. (In 'memberHolderObject.toJSON()', 'memberHolderObject.toJSON' is undefined)
+PASS Performance interface: performance must inherit property "toJSON()" with the proper type 
+FAIL Performance interface: default toJSON operation on performance assert_true: property "timeOrigin" should be present in the output of Performance.prototype.toJSON() expected true got false
 PASS Window interface: existence and properties of interface object 
 PASS WorkerGlobalScope interface: attribute performance 
 PASS WorkerGlobalScope interface: self must inherit property "performance" with the proper type 
index 2f7d876..ed577aa 100644 (file)
@@ -1,3 +1,21 @@
+2020-09-19  Sam Weinig  <weinig@apple.com>
+
+        Performance and PerformanceNavigation interfaces are missing toJSON operations
+        https://bugs.webkit.org/show_bug.cgi?id=216728
+
+        Reviewed by Darin Adler.
+
+        Add missing toJSON operations to Performance and PerformanceNavigation and update
+        comments in related IDLs.
+        
+        Updates results for existing tests, more of which now pass.
+
+        * page/Performance.idl:
+        * page/PerformanceMark.idl:
+        * page/PerformanceMeasure.idl:
+        * page/PerformanceNavigation.idl:
+        * page/PerformanceTiming.idl:
+
 2020-09-19  Zalan Bujtas  <zalan@apple.com>
 
         [LFC][IFC] InlineFormattingContext::computeGeometryForLineContent should not construct Display::Lines
index 0b927ab..c655e4a 100644 (file)
@@ -38,28 +38,29 @@ typedef double DOMHighResTimeStamp;
     GenerateIsReachable=ImplScriptExecutionContext,
 ] interface Performance : EventTarget {
     DOMHighResTimeStamp now();
-    // FIXME: Implement 'timeOrigin'.
+    // FIXME: Implement 'timeOrigin' - https://webkit.org/b/174862
     // readonly attribute DOMHighResTimeStamp timeOrigin;
-    // FIXME: Implement 'toJSON'.
-    // [Default] object toJSON();
+    [Default] object toJSON();
 
-    // https://w3c.github.io/navigation-timing/
+    // https://w3c.github.io/navigation-timing/#extensions-to-the-performance-interface
     readonly attribute PerformanceNavigation navigation;
     readonly attribute PerformanceTiming timing;
 
-    // https://w3c.github.io/performance-timeline/
+    // https://w3c.github.io/performance-timeline/#extensions-to-the-performance-interface
     PerformanceEntryList getEntries();
     PerformanceEntryList getEntriesByType(DOMString entryType);
     PerformanceEntryList getEntriesByName(DOMString name, optional DOMString entryType);
 
-    // https://w3c.github.io/resource-timing/
+    // https://w3c.github.io/resource-timing/#sec-extensions-performance-interface
     undefined clearResourceTimings();
     undefined setResourceTimingBufferSize(unsigned long maxSize);
     attribute EventHandler onresourcetimingbufferfull;
 
-    // https://w3c.github.io/user-timing/
+    // https://w3c.github.io/user-timing/#extensions-performance-interface
+    // FIXME: 'mark' should return a PerformanceMark.
     [MayThrowException] undefined mark(DOMString markName);
     undefined clearMarks(optional DOMString markName);
+    // FIXME: 'measure' should return a PerformanceMeasure.
     [MayThrowException] undefined measure(DOMString measureName, optional DOMString startMark, optional DOMString endMark);
     undefined clearMeasures(optional DOMString measureName);
 };
index 0c79fe0..60117d5 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// https://w3c.github.io/user-timing/
-
+// https://w3c.github.io/user-timing/#performancemark
 [
     Exposed=(Window,Worker),
 ] interface PerformanceMark : PerformanceEntry {
+    // FIXME: Implement constructor.
+    // constructor(DOMString markName, optional PerformanceMarkOptions markOptions = {});
+    // FIXME: Implement 'detail'.
+    // readonly attribute any detail;
 };
index dfa2559..1ea57ba 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// https://w3c.github.io/user-timing/
-
+// https://w3c.github.io/user-timing/#performancemeasure
 [
     Exposed=(Window,Worker),
 ] interface PerformanceMeasure : PerformanceEntry {
+    // FIXME: Implement 'detail'.
+    // readonly attribute any detail;
 };
index 0d24d02..da9a3d8 100644 (file)
@@ -28,7 +28,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// See: http://www.w3.org/TR/navigation-timing/
+// https://w3c.github.io/navigation-timing/#the-performancenavigation-interface
 [
     ImplementationLacksVTable,
 ] interface PerformanceNavigation {
@@ -37,7 +37,7 @@
     const unsigned short TYPE_BACK_FORWARD = 2;
     const unsigned short TYPE_RESERVED = 255;
     readonly attribute unsigned short type;
-
     readonly attribute unsigned short redirectCount;
+    [Default] object toJSON();
 };
 
index a3f3f2f..a39644f 100644 (file)
@@ -28,7 +28,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// See: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
+// https://w3c.github.io/navigation-timing/#the-performancetiming-interface
 [
     ImplementationLacksVTable,
 ] interface PerformanceTiming {
@@ -53,6 +53,5 @@
     readonly attribute unsigned long long domComplete;
     readonly attribute unsigned long long loadEventStart;
     readonly attribute unsigned long long loadEventEnd;
-
     [Default] object toJSON();
 };