Title: [237408] trunk/LayoutTests
Revision
237408
Author
[email protected]
Date
2018-10-25 00:24:59 -0700 (Thu, 25 Oct 2018)

Log Message

[WPT] Update resource-timing WPT tests to use the right cross origin
https://bugs.webkit.org/show_bug.cgi?id=190554

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain-expected.txt:
* web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain.html:
* web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain-expected.txt:
* web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html:

LayoutTests:

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (237407 => 237408)


--- trunk/LayoutTests/ChangeLog	2018-10-25 06:12:50 UTC (rev 237407)
+++ trunk/LayoutTests/ChangeLog	2018-10-25 07:24:59 UTC (rev 237408)
@@ -1,3 +1,12 @@
+2018-10-25  Jiewen Tan  <[email protected]>
+
+        [WPT] Update resource-timing WPT tests to use the right cross origin
+        https://bugs.webkit.org/show_bug.cgi?id=190554
+
+        Reviewed by Youenn Fablet.
+
+        * TestExpectations:
+
 2018-10-24  Tim Horton  <[email protected]>
 
         Attachment filenames with RTL characters should format similar to Finder

Modified: trunk/LayoutTests/TestExpectations (237407 => 237408)


--- trunk/LayoutTests/TestExpectations	2018-10-25 06:12:50 UTC (rev 237407)
+++ trunk/LayoutTests/TestExpectations	2018-10-25 07:24:59 UTC (rev 237408)
@@ -358,6 +358,7 @@
 webkit.org/b/189906 imported/w3c/web-platform-tests/resource-timing/resource_timing_buffer_full_eventually.html [ Skip ]
 webkit.org/b/189905 imported/w3c/web-platform-tests/resource-timing/resource_initiator_types.html [ Pass Failure ]
 webkit.org/b/189910 imported/w3c/web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback.html [ Pass Failure ]
+webkit.org/b/190523 imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html [ Pass Failure ]
 
 # The follow two tests change their output each run
 imported/w3c/web-platform-tests/fetch/api/abort/general.any.html [ Skip ]

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (237407 => 237408)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2018-10-25 06:12:50 UTC (rev 237407)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2018-10-25 07:24:59 UTC (rev 237408)
@@ -1,3 +1,15 @@
+2018-10-25  Jiewen Tan  <[email protected]>
+
+        [WPT] Update resource-timing WPT tests to use the right cross origin
+        https://bugs.webkit.org/show_bug.cgi?id=190554
+
+        Reviewed by Youenn Fablet.
+
+        * web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain-expected.txt:
+        * web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain.html:
+        * web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain-expected.txt:
+        * web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html:
+
 2018-10-22  Justin Michaud  <[email protected]>
 
         Registered custom properties should support syntax parameter for <length> and *

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain-expected.txt (237407 => 237408)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain-expected.txt	2018-10-25 06:12:50 UTC (rev 237407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain-expected.txt	2018-10-25 07:24:59 UTC (rev 237408)
@@ -1,10 +1,10 @@
-Blocked access to external URL http://www.localhost:8800/resource-timing/resources/multi_redirect.py?page_origin=http://localhost:8800&cross_origin=http://www.localhost:8800&timing_allow=1
-CONSOLE MESSAGE: line 26: TypeError: undefined is not an object (evaluating 'entry.redirectStart')
 
 
-Harness Error (FAIL), message = TypeError: undefined is not an object (evaluating 'entry.redirectStart')
-
 PASS window.performance is defined 
 PASS window.performance.getEntriesByName is defined 
-FAIL There should be one entry. assert_equals: There should be one entry. expected 1 but got 0
+PASS There should be one entry. 
+PASS redirectStart > 0 in timing allowed cross-origin redirect. 
+PASS redirectStart == startTime in timing allowed cross-origin redirect. 
+PASS redirectEnd > redirectStart in timing allowed cross-origin redirect. 
+PASS fetchStart >= redirectEnd in timing allowed cross-origin redirect. 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain.html (237407 => 237408)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain.html	2018-10-25 06:12:50 UTC (rev 237407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain.html	2018-10-25 07:24:59 UTC (rev 237408)
@@ -7,6 +7,7 @@
 <link rel="help" href=""
 <script src=""
 <script src=""
+<script src=""
 <script src=""
 <script src=""
 
@@ -13,8 +14,6 @@
 <script>
     setup({explicit_done: true});
     test_namespace('getEntriesByName');
-    const pageOrigin = document.location.host;
-    const crossOrigin = 'www.' + pageOrigin;
 
     function onload_test()
     {
@@ -35,9 +34,9 @@
 <body>
 <iframe id="frameContext" src="" style="width: 250px; height: 250px;"></iframe>
 <script>
-    let destUrl = 'http://' + crossOrigin + '/resource-timing/resources/multi_redirect.py?';
-    destUrl += 'page_origin=' + 'http://' + pageOrigin;
-    destUrl += '&cross_origin=' + 'http://' + crossOrigin;
+    let destUrl = get_host_info().HTTP_REMOTE_ORIGIN + '/resource-timing/resources/multi_redirect.py?';
+    destUrl += 'page_origin=' + 'http://' + document.location.host;
+    destUrl += '&cross_origin=' + get_host_info().HTTP_REMOTE_ORIGIN;
     destUrl += '&timing_allow=1';
     const frameContext = document.getElementById('frameContext');
     frameContext._onload_ = onload_test;

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain-expected.txt (237407 => 237408)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain-expected.txt	2018-10-25 06:12:50 UTC (rev 237407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain-expected.txt	2018-10-25 07:24:59 UTC (rev 237408)
@@ -1,10 +1,10 @@
-Blocked access to external URL http://www.localhost:8800/resource-timing/resources/multi_redirect.py?page_origin=http://localhost:8800&cross_origin=http://www.localhost:8800
-CONSOLE MESSAGE: line 26: TypeError: undefined is not an object (evaluating 'entry.redirectStart')
 
 
-Harness Error (FAIL), message = TypeError: undefined is not an object (evaluating 'entry.redirectStart')
-
 PASS window.performance is defined 
 PASS window.performance.getEntriesByName is defined 
-FAIL There should be one entry. assert_equals: There should be one entry. expected 1 but got 0
+PASS There should be one entry. 
+FAIL redirectStart == 0 in cross-origin redirect. assert_equals: redirectStart == 0 in cross-origin redirect. expected 0 but got 889
+FAIL redirectEnd == 0 in cross-origin redirect. assert_equals: redirectEnd == 0 in cross-origin redirect. expected 0 but got 955.0000000000001
+PASS fetchStart > 0 in cross-origin redirect. 
+FAIL startTime == fetchStart in cross-origin redirect. assert_equals: startTime == fetchStart in cross-origin redirect. expected 955.0000000000001 but got 889
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html (237407 => 237408)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html	2018-10-25 06:12:50 UTC (rev 237407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html	2018-10-25 07:24:59 UTC (rev 237408)
@@ -7,6 +7,7 @@
 <link rel="help" href=""
 <script src=""
 <script src=""
+<script src=""
 <script src=""
 <script src=""
 
@@ -13,8 +14,6 @@
 <script>
     setup({explicit_done: true});
     test_namespace('getEntriesByName');
-    const pageOrigin = document.location.host;
-    const crossOrigin = 'www.' + pageOrigin;
 
     function onload_test()
     {
@@ -35,9 +34,9 @@
 <body>
 <iframe id="frameContext" src="" style="width: 250px; height: 250px;"></iframe>
 <script>
-    let destUrl = 'http://' + crossOrigin + '/resource-timing/resources/multi_redirect.py?';
-    destUrl += 'page_origin=' + 'http://' + pageOrigin;
-    destUrl += '&cross_origin=' + 'http://' + crossOrigin;
+    let destUrl = get_host_info().HTTP_REMOTE_ORIGIN + '/resource-timing/resources/multi_redirect.py?';
+    destUrl += 'page_origin=' + 'http://' + document.location.host;
+    destUrl += '&cross_origin=' + get_host_info().HTTP_REMOTE_ORIGIN;
     const frameContext = document.getElementById('frameContext');
     frameContext._onload_ = onload_test;
     frameContext.src = ""
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to