Performance.navigation and Performance.timing are incorrectly exposed to workers
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Sep 2020 23:07:51 +0000 (23:07 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Sep 2020 23:07:51 +0000 (23:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=216732

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/workers/worker-performance.worker-expected.txt:
Update results now that Performance.navigation and Performance.timing are no longer
exposed to workers.

Source/WebCore:

* page/Performance.idl:
Only expose Performance.navigation and Performance.timing to the Window.

LayoutTests:

* TestExpectations:
Remove flaky annotation for imported/w3c/web-platform-tests/workers/worker-performance.worker.html. The
test was fixed in upstream WPT as dab9c45, and has since been updated in the WebKit tree as well.
It now also passes.

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

LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/workers/worker-performance.worker-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/page/Performance.idl

index def7b5a..173b0ed 100644 (file)
@@ -1,3 +1,15 @@
+2020-09-20  Sam Weinig  <weinig@apple.com>
+
+        Performance.navigation and Performance.timing are incorrectly exposed to workers
+        https://bugs.webkit.org/show_bug.cgi?id=216732
+
+        Reviewed by Simon Fraser.
+
+        * TestExpectations:
+        Remove flaky annotation for imported/w3c/web-platform-tests/workers/worker-performance.worker.html. The
+        test was fixed in upstream WPT as dab9c45, and has since been updated in the WebKit tree as well.
+        It now also passes.
+
 2020-09-20  Darin Adler  <darin@apple.com>
 
         Selection API: Further improvements to VisibleSelection, FrameSelection, and DOMSelection to preserve anchor and focus
 2020-09-20  Darin Adler  <darin@apple.com>
 
         Selection API: Further improvements to VisibleSelection, FrameSelection, and DOMSelection to preserve anchor and focus
index 2f760d8..cb35402 100644 (file)
@@ -2757,9 +2757,6 @@ webkit.org/b/158205 applicationmanifest/ [ Skip ]
 
 webkit.org/b/178785 perf/object-keys.html [ Pass Failure ]
 
 
 webkit.org/b/178785 perf/object-keys.html [ Pass Failure ]
 
-# There is a bug in the test
-imported/w3c/web-platform-tests/workers/worker-performance.worker.html [ Pass Failure ]
-
 webkit.org/b/183390 http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html [ Pass Failure ]
 
 webkit.org/b/172243 imported/w3c/web-platform-tests/IndexedDB/idbdatabase-createObjectStore-exception-order.htm [ Pass Failure ]
 webkit.org/b/183390 http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html [ Pass Failure ]
 
 webkit.org/b/172243 imported/w3c/web-platform-tests/IndexedDB/idbdatabase-createObjectStore-exception-order.htm [ Pass Failure ]
index 518fcce..d25c3bc 100644 (file)
@@ -1,3 +1,14 @@
+2020-09-20  Sam Weinig  <weinig@apple.com>
+
+        Performance.navigation and Performance.timing are incorrectly exposed to workers
+        https://bugs.webkit.org/show_bug.cgi?id=216732
+
+        Reviewed by Simon Fraser.
+
+        * web-platform-tests/workers/worker-performance.worker-expected.txt:
+        Update results now that Performance.navigation and Performance.timing are no longer
+        exposed to workers.
+
 2020-09-19  Sam Weinig  <weinig@apple.com>
 
         Performance and PerformanceNavigation interfaces are missing toJSON operations
 2020-09-19  Sam Weinig  <weinig@apple.com>
 
         Performance and PerformanceNavigation interfaces are missing toJSON operations
index 3ad871a..0309244 100644 (file)
@@ -9,8 +9,8 @@ PASS Can use clearMarks and clearMeasures in workers
 PASS Resource timing seems to work in workers 
 PASS performance.clearResourceTimings in workers 
 PASS performance.setResourceTimingBufferSize in workers 
 PASS Resource timing seems to work in workers 
 PASS performance.clearResourceTimings in workers 
 PASS performance.setResourceTimingBufferSize in workers 
-FAIL performance.timing is not available in workers assert_equals: performance.timing is undefined expected "undefined" but got "object"
-FAIL performance.navigation is not available in workers assert_equals: performance.navigation is undefined expected "undefined" but got "object"
-FAIL performance.toJSON is available in workers assert_equals: performance.toJSON is a function expected "function" but got "undefined"
+PASS performance.timing is not available in workers 
+PASS performance.navigation is not available in workers 
+PASS performance.toJSON is available in workers 
 PASS There are no navigation type performance entries in workers 
 
 PASS There are no navigation type performance entries in workers 
 
index f6e6544..24cd38d 100644 (file)
@@ -1,5 +1,15 @@
 2020-09-20  Sam Weinig  <weinig@apple.com>
 
 2020-09-20  Sam Weinig  <weinig@apple.com>
 
+        Performance.navigation and Performance.timing are incorrectly exposed to workers
+        https://bugs.webkit.org/show_bug.cgi?id=216732
+
+        Reviewed by Simon Fraser.
+
+        * page/Performance.idl:
+        Only expose Performance.navigation and Performance.timing to the Window.
+
+2020-09-20  Sam Weinig  <weinig@apple.com>
+
         Using [Exposed=Window] with [Default] object toJSON() doesn't work
         https://bugs.webkit.org/show_bug.cgi?id=216731
 
         Using [Exposed=Window] with [Default] object toJSON() doesn't work
         https://bugs.webkit.org/show_bug.cgi?id=216731
 
index c655e4a..cf3f20f 100644 (file)
@@ -43,8 +43,8 @@ typedef double DOMHighResTimeStamp;
     [Default] object toJSON();
 
     // https://w3c.github.io/navigation-timing/#extensions-to-the-performance-interface
     [Default] object toJSON();
 
     // https://w3c.github.io/navigation-timing/#extensions-to-the-performance-interface
-    readonly attribute PerformanceNavigation navigation;
-    readonly attribute PerformanceTiming timing;
+    [Exposed=Window] readonly attribute PerformanceNavigation navigation;
+    [Exposed=Window] readonly attribute PerformanceTiming timing;
 
     // https://w3c.github.io/performance-timeline/#extensions-to-the-performance-interface
     PerformanceEntryList getEntries();
 
     // https://w3c.github.io/performance-timeline/#extensions-to-the-performance-interface
     PerformanceEntryList getEntries();