Changeset 239959 in webkit
- Timestamp:
- Jan 14, 2019 4:00:04 PM (5 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 35 added
- 4 deleted
- 19 edited
- 1 copied
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r239958 r239959 1 2019-01-14 Charles Vazac <cvazac@akamai.com> 2 3 Import current Resource-Timing WPTs 4 https://bugs.webkit.org/show_bug.cgi?id=193302 5 6 Reviewed by Youenn Fablet. 7 8 * TestExpectations: 9 * tests-options.json: 10 1 11 2019-01-14 Jiewen Tan <jiewen_tan@apple.com> 2 12 -
trunk/LayoutTests/TestExpectations
r239864 r239959 379 379 webkit.org/b/189906 imported/w3c/web-platform-tests/resource-timing/resource_timing_buffer_full_eventually.html [ Skip ] 380 380 webkit.org/b/189905 imported/w3c/web-platform-tests/resource-timing/resource_initiator_types.html [ Pass Failure ] 381 webkit.org/b/189910 imported/w3c/web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback.html [ Pass Failure ]382 381 webkit.org/b/190523 imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html [ Pass Failure ] 383 382 … … 772 771 imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream.html [ DumpJSConsoleLogInStdErr ] 773 772 774 webkit.org/b/161088 imported/w3c/web-platform-tests/resource-timing/resource-timing.html [ Pass Failure ]775 773 imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html [ Pass Failure ] 774 imported/w3c/web-platform-tests/resource-timing/test_resource_timing.https.html [ Pass Failure ] 775 imported/w3c/web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-that-drop.html [ Skip ] 776 imported/w3c/web-platform-tests/resource-timing/buffer-full-decrease-buffer-during-callback.html [ Skip ] 777 778 imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse.html [ Failure ] 779 imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse.https.html [ Failure ] 780 imported/w3c/web-platform-tests/resource-timing/resource_reparenting.html [ Failure ] 776 781 777 782 webkit.org/b/168357 http/wpt/resource-timing/rt-initiatorType-media.html [ Failure ] … … 2907 2912 webkit.org/b/187773 http/tests/webAPIStatistics [ Skip ] 2908 2913 2909 webkit.org/b/189997 imported/w3c/web-platform-tests/resource-timing/resource_timing.worker.html [ Failure ]2910 2911 2914 # This is fallout from turning Web Animations on. 2912 2915 webkit.org/b/190032 animations/animation-playstate-paused-style-resolution.html [ Failure ] -
trunk/LayoutTests/imported/w3c/ChangeLog
r239831 r239959 1 2019-01-14 Charles Vazac <cvazac@akamai.com> 2 3 Import current Resource-Timing WPTs 4 https://bugs.webkit.org/show_bug.cgi?id=193302 5 6 Reviewed by Youenn Fablet. 7 8 * web-platform-tests/resource-timing/SyntheticResponse.py: 9 (main): 10 * web-platform-tests/resource-timing/buffer-full-add-after-full-event-expected.txt: Added. 11 * web-platform-tests/resource-timing/buffer-full-add-after-full-event.html: Added. 12 * web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-expected.txt: Added. 13 * web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-that-drop.html: Added. 14 * web-platform-tests/resource-timing/buffer-full-add-entries-during-callback.html: Added. 15 * web-platform-tests/resource-timing/buffer-full-add-then-clear-expected.txt: Added. 16 * web-platform-tests/resource-timing/buffer-full-add-then-clear.html: Added. 17 * web-platform-tests/resource-timing/buffer-full-decrease-buffer-during-callback.html: Added. 18 * web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback-expected.txt: Added. 19 * web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback.html: Added. 20 * web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback-expected.txt: Added. 21 * web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback.html: Added. 22 * web-platform-tests/resource-timing/buffer-full-set-to-current-buffer-expected.txt: Added. 23 * web-platform-tests/resource-timing/buffer-full-set-to-current-buffer.html: Added. 24 * web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback-expected.txt: Added. 25 * web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback.html: Added. 26 * web-platform-tests/resource-timing/buffer-full-then-increased-expected.txt: Added. 27 * web-platform-tests/resource-timing/buffer-full-then-increased.html: Added. 28 * web-platform-tests/resource-timing/buffer-full-when-populate-entries-expected.txt: Added. 29 * web-platform-tests/resource-timing/buffer-full-when-populate-entries.html: Added. 30 * web-platform-tests/resource-timing/document-domain-no-impact-loader.sub-expected.txt: Added. 31 * web-platform-tests/resource-timing/document-domain-no-impact-loader.sub.html: Added. 32 * web-platform-tests/resource-timing/no-entries-for-cross-origin-css-fetched.sub-expected.txt: Added. 33 * web-platform-tests/resource-timing/no-entries-for-cross-origin-css-fetched.sub.html: Added. 34 * web-platform-tests/resource-timing/resource-timing-level1.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing.js. 35 (assertInvariants): 36 (window.onload): 37 * web-platform-tests/resource-timing/resource-timing-level1.sub-expected.txt: Added. 38 * web-platform-tests/resource-timing/resource-timing-level1.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing.html. 39 * web-platform-tests/resource-timing/resource_connection_reuse.html: 40 * web-platform-tests/resource-timing/resource_timing.worker.js: 41 * web-platform-tests/resource-timing/resource_timing_buffer_full_when_populate_entries-expected.txt: Removed. 42 * web-platform-tests/resource-timing/resource_timing_buffer_full_when_populate_entries.html: Removed. 43 * web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback-expected.txt: Removed. 44 * web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback.html: Removed. 45 * web-platform-tests/resource-timing/resources/buffer-full-utilities.js: Added. 46 (let.appendScript): 47 (let.waitForNextTask): 48 (let.waitForEventToFire.return.new.Promise): 49 (let.waitForEventToFire): 50 * web-platform-tests/resource-timing/resources/document-domain-no-impact.sub.html: Added. 51 * web-platform-tests/resource-timing/resources/iframe-setdomain.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/iframe-setdomain.sub.html. 52 * web-platform-tests/resource-timing/resources/w3c-import.log: 53 * web-platform-tests/resource-timing/resources/webperftestharness.js: 54 (wp_test): 55 (test_namespace): 56 * web-platform-tests/resource-timing/resources/webperftestharnessextension.js: 57 (test_resource_entries): 58 (performance_entrylist_checker): Deleted. 59 * web-platform-tests/resource-timing/single-entry-per-resource.html: 60 * web-platform-tests/resource-timing/supported_resource_type.any-expected.txt: Added. 61 * web-platform-tests/resource-timing/supported_resource_type.any.html: Added. 62 * web-platform-tests/resource-timing/supported_resource_type.any.js: Added. 63 (test): 64 * web-platform-tests/resource-timing/supported_resource_type.any.worker-expected.txt: Added. 65 * web-platform-tests/resource-timing/supported_resource_type.any.worker.html: Added. 66 * web-platform-tests/resource-timing/test_resource_timing.https-expected.txt: Added. 67 * web-platform-tests/resource-timing/test_resource_timing.https.html: Added. 68 * web-platform-tests/resource-timing/test_resource_timing.js: 69 (resource_load): 70 * web-platform-tests/resource-timing/w3c-import.log: 1 71 2019-01-10 Oriol Brufau <obrufau@igalia.com> 2 72 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/SyntheticResponse.py
r215164 r239959 1 1 import urllib 2 import time 2 import sys, os 3 sys.path.append(os.path.join(os.path.dirname(__file__), "../common/")) 4 import sleep 3 5 4 6 def main(request, response): 5 7 index = request.request_path.index("?") 6 8 args = request.request_path[index+1:].split("&") 7 headersSent = 0 9 headers = [] 10 statusSent = False 11 headersSent = False 8 12 for arg in args: 9 13 if arg.startswith("ignored"): 10 14 continue 11 15 elif arg.endswith("ms"): 12 time.sleep(float(arg[0:-2]) / 1E3);16 sleep.sleep_at_least(float(arg[0:-2])) 13 17 elif arg.startswith("redirect:"): 14 18 return (302, "WEBPERF MARKETING"), [("Location", urllib.unquote(arg[9:]))], "TEST" 15 19 elif arg.startswith("mime:"): 16 response.headers.set("Content-Type", urllib.unquote(arg[5:]))20 headers.append(("Content-Type", urllib.unquote(arg[5:]))) 17 21 elif arg.startswith("send:"): 18 22 text = urllib.unquote(arg[5:]) 19 if headersSent == 0: 20 response.write_status_headers() 21 headersSent = 1 23 24 if not statusSent: 25 # Default to a 200 status code. 26 response.writer.write_status(200) 27 statusSent = True 28 if not headersSent: 29 for key, value in headers: 30 response.writer.write_header(key, value) 31 response.writer.end_headers() 32 headersSent = True 22 33 23 34 response.writer.write_content(text) 35 elif arg.startswith("status:"): 36 code = int(urllib.unquote(arg[7:])) 37 response.writer.write_status(code) 38 if code // 100 == 1: 39 # Terminate informational 1XX responses with an empty line. 40 response.writer.end_headers() 41 else: 42 statusSent = True 43 elif arg == "flush": 44 response.writer.flush() 45 24 46 # else: 25 47 # error " INVALID ARGUMENT %s" % arg -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.js
r239958 r239959 54 54 } 55 55 }, 56 {57 description: "Setting 'document.domain' does not effect same-origin checks",58 test:59 function (test) {60 initiateFetch(61 test,62 "iframe",63 canonicalize("iframe-setdomain.sub.html"),64 function (initiator, entry) {65 // Ensure that the script inside the IFrame has successfully changed the IFrame's domain.66 assert_throws(67 null,68 function () {69 assert_not_equals(frame.contentWindow.document, null);70 },71 "Test Error: IFrame is not recognized as cross-domain.");72 73 // To verify that setting 'document.domain' did not change the results of the timing allow check,74 // verify that the following non-zero properties return their value.75 ["domainLookupStart", "domainLookupEnd", "connectStart", "connectEnd"]76 .forEach(function(property) {77 assert_greater_than(entry.connectEnd, 0,78 "Property should be non-zero because timing allow check ignores 'document.domain'.");79 });80 test.done();81 });82 }83 }84 56 ]; 85 57 … … 225 197 }); 226 198 199 // Ensure that responseStart only measures the time up to the first few 200 // bytes of the header response. This is tested by writing an HTTP 1.1 201 // status line, followed by a flush, then a pause before the end of the 202 // headers. The test makes sure that responseStart is not delayed by 203 // this pause. 204 [ 205 { initiator: "iframe", response: "(done)", mime: mimeHtml }, 206 { initiator: "xmlhttprequest", response: "(done)", mime: mimeText }, 207 { initiator: "script", response: '"";', mime: mimeScript }, 208 { initiator: "link", response: ".unused{}", mime: mimeCss }, 209 ] 210 .forEach(function (template) { 211 testCases.push({ 212 description: "'" + template.initiator + " " + serverStepDelay + "ms delay in headers does not affect responseStart'", 213 test: function (test) { 214 initiateFetch( 215 test, 216 template.initiator, 217 getSyntheticUrl("status:200" 218 + "&flush" 219 + "&" + serverStepDelay + "ms" 220 + "&mime:" + template.mime 221 + "&send:" + encodeURIComponent(template.response)), 222 function (initiator, entry) { 223 // Test that the delay between 'responseStart' and 224 // 'responseEnd' includes the delay, which implies 225 // that 'responseStart' was measured at the time of 226 // status line receipt. 227 assert_greater_than_equal( 228 entry.responseEnd, 229 entry.responseStart + serverStepDelay, 230 "Delay after HTTP/1.1 status should not affect 'responseStart'."); 231 232 test.done(); 233 }); 234 } 235 }); 236 }); 237 238 // Test that responseStart uses the timing of 1XX responses by 239 // synthesizing a delay between a 100 and 200 status, and verifying that 240 // this delay is included before responseEnd. If the delay is not 241 // included, this implies that the 200 status line was (incorrectly) used 242 // for responseStart timing, despite the 100 response arriving earlier. 243 // 244 // Source: "In the case where more than one response is available for a 245 // request, due to an Informational 1xx response, the reported 246 // responseStart value is that of the first response to the last 247 // request." 248 [ 249 { initiator: "iframe", response: "(done)", mime: mimeHtml }, 250 { initiator: "xmlhttprequest", response: "(done)", mime: mimeText }, 251 { initiator: "script", response: '"";', mime: mimeScript }, 252 { initiator: "link", response: ".unused{}", mime: mimeCss }, 253 ] 254 .forEach(function (template) { 255 testCases.push({ 256 description: "'" + template.initiator + " responseStart uses 1XX (first) response timings'", 257 test: function (test) { 258 initiateFetch( 259 test, 260 template.initiator, 261 getSyntheticUrl("status:100" 262 + "&flush" 263 + "&" + serverStepDelay + "ms" 264 + "&status:200" 265 + "&mime:" + template.mime 266 + "&send:" + encodeURIComponent(template.response)), 267 function (initiator, entry) { 268 assert_greater_than_equal( 269 entry.responseEnd, 270 entry.responseStart + serverStepDelay, 271 "HTTP/1.1 1XX (first) response should determine 'responseStart' timing."); 272 273 test.done(); 274 }); 275 } 276 }); 277 }); 278 227 279 // Function to run the next case in the queue. 228 280 var currentTestIndex = -1; … … 245 297 // Yield for 100ms to workaround a suspected race where window.onload fires before 246 298 // script visible side-effects from the wininet/urlmon thread have finished. 247 window.setTimeout(299 test.step_timeout( 248 300 test.step_func( 249 301 function () { … … 389 441 function createOnloadCallbackFn(test, initiator, url, onloadCallback) { 390 442 // Remember the number of entries on the timeline prior to initiating the fetch: 391 var beforeEntryCount = performance.getEntries ().length;443 var beforeEntryCount = performance.getEntriesByType("resource").length; 392 444 393 445 return test.step_func( … … 401 453 } 402 454 403 var entries = performance.getEntries ();455 var entries = performance.getEntriesByType("resource"); 404 456 var candidateEntry = entries[entries.length - 1]; 405 457 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.sub.html
r239958 r239959 3 3 <head> 4 4 <title>Resource-Timing Level 1</title> 5 <meta name="timeout" content="long"> 5 6 <!-- To aid debugability, explicitly link the testharness's CSS to avoid demand 6 7 loading it while the test executes. --> … … 14 15 <div id="log"></div> 15 16 <pre id="output"></pre> 16 <script src="resource-timing .js"></script>17 <script src="resource-timing-level1.js"></script> 17 18 </body> 18 19 </html> -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse.html
r230445 r239959 22 22 iframe = document.getElementById('frameContext'); 23 23 d = iframe.contentWindow.document; 24 iframeBody = d.body;25 24 iframe.addEventListener('load', onload_test, false); 26 25 } … … 42 41 test_equals(entry.fetchStart, entry.connectStart, 'connectStart and fetchStart should be the same'); 43 42 test_equals(entry.fetchStart, entry.connectEnd, 'connectEnd and fetchStart should be the same'); 43 if(!window.isSecureConnection) { 44 test_equals(entry.secureConnectionStart, 0, 'secureConnectStart should be zero'); 45 } 46 test_equals(entry.fetchStart, entry.domainLookupStart, 'domainLookupStart and fetchStart should be the same') 47 test_equals(entry.fetchStart, entry.domainLookupEnd, 'domainLookupEnd and fetchStart should be the same') 44 48 } 45 49 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse.https.html
r239958 r239959 22 22 iframe = document.getElementById('frameContext'); 23 23 d = iframe.contentWindow.document; 24 iframeBody = d.body;25 24 iframe.addEventListener('load', onload_test, false); 26 25 } … … 42 41 test_equals(entry.fetchStart, entry.connectStart, 'connectStart and fetchStart should be the same'); 43 42 test_equals(entry.fetchStart, entry.connectEnd, 'connectEnd and fetchStart should be the same'); 43 test_equals(entry.fetchStart, entry.secureConnectionStart, 'secureConnectStart and fetchStart should be the same'); 44 test_equals(entry.fetchStart, entry.domainLookupStart, 'domainLookupStart and fetchStart should be the same') 45 test_equals(entry.fetchStart, entry.domainLookupEnd, 'domainLookupEnd and fetchStart should be the same') 44 46 } 45 47 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_dynamic_insertion-expected.txt
r211006 r239959 6 6 PASS window.performance is defined 7 7 PASS window.performance.getEntriesByType is defined 8 PASS http://localhost:8800/resource-timing/resources/inject_resource_test.html is expected to have initiatorType iframe 9 PASS http://localhost:8800/resource-timing/resources/resource_timing_test0.css is expected to have initiatorType link 10 PASS http://localhost:8800/resource-timing/resources/resource_timing_test0.png is expected to have initiatorType img 8 PASS Testing resource entries 11 9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_memory_cached.sub-expected.txt
r236402 r239959 1 Blocked access to external URL http://www1.localhost:8801/resource-timing/resources/blue.png?id=cached2 Blocked access to external URL http://www1.localhost:8801/resource-timing/resources/blue.png?id=cached3 Blocked access to external URL http://www1.localhost:8801/resource-timing/resources/blue.png?id=cached4 1 Description 5 2 … … 7 4 8 5 9 Harness Error (TIMEOUT), message = null10 11 6 PASS There should be only one entry 12 PASS http://localhost:8800/resource-timing/resources/blue.png?id=cached is expected to have initiatorType img7 PASS Testing resource entries 13 8 PASS requestStart should be non-zero on the same-origin request 14 9 PASS responseEnd should not be before startTime 15 10 PASS duration should not be negative 11 PASS There should be one entry in second test 12 PASS Entry name should start with cross-origin domain 13 PASS Entry name should end with file name 14 PASS requestStart should be 0 on the cross-origin request 16 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_memory_cached.sub.html
r236402 r239959 10 10 <script src="resources/webperftestharness.js"></script> 11 11 <script src="resources/webperftestharnessextension.js"></script> 12 <script src="/common/get-host-info.sub.js"></script> 12 13 <script> 13 14 setup({explicit_done: true}); … … 16 17 let iframeBody; 17 18 let count = 0; 19 const host = get_host_info(); 18 20 function onload_prep() { 19 21 iframe = document.getElementById('frameContext'); … … 21 23 iframeBody = d.body; 22 24 23 const image = d.createElement(' img');25 const image = d.createElement('IMG'); 24 26 image.addEventListener('load', function() { 25 27 step_timeout(onload_test, 0); }); … … 27 29 iframeBody.appendChild(image); 28 30 29 const image2 = d.createElement(' img');31 const image2 = d.createElement('IMG'); 30 32 image2.addEventListener('load', function() { 31 33 step_timeout(onload_test, 0); }); … … 56 58 } 57 59 function start_crossorigin_test() { 58 const image3 = d.createElement(' img');60 const image3 = d.createElement('IMG'); 59 61 image3.addEventListener("load", function() { step_timeout(finish_crossorigin_test, 0); }); 60 image3.src = 'http:// {{domains[www1]}}:{{ports[http][1]}}{{location[path]}}/../resources/blue.png?id=cached';62 image3.src = 'http://' + host.REMOTE_HOST + ':{{ports[http][1]}}{{location[path]}}/../resources/blue.png?id=cached'; 61 63 iframeBody.appendChild(image3); 62 64 } … … 65 67 const entries = context.getEntriesByType('resource'); 66 68 test_equals(entries.length, 1, 'There should be one entry in second test'); 67 test_true(entries[0].name.startsWith('http:// {{domains[www1]}}:{{ports[http][1]}}'), 'Entry name should start with cross-origin domain');69 test_true(entries[0].name.startsWith('http://' + host.REMOTE_HOST + ':{{ports[http][1]}}'), 'Entry name should start with cross-origin domain'); 68 70 test_true(entries[0].name.endsWith('/resources/blue.png?id=cached'), 'Entry name should end with file name'); 69 71 test_equals(entries[0].requestStart, 0, 'requestStart should be 0 on the cross-origin request'); … … 80 82 <iframe id="frameContext" src="resources/inject_resource_test.html"></iframe> 81 83 <img src="resources/blue.png?id=cached"></img> 82 <img src="http://{{domains[www1]}}:{{ports[http][1]}}{{location[path]}}/../resources/blue.png?id=cached"></img> 84 <script> 85 const img = document.createElement('IMG'); 86 img.src = "http://" + host.REMOTE_HOST + ":{{ports[http][1]}}{{location[path]}}/../resources/blue.png?id=cached"; 87 document.currentScript.parentNode.insertBefore(img, document.currentScript); 88 </script> 83 89 </body> 84 90 </html> -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_redirects-expected.txt
r236402 r239959 4 4 5 5 6 PASS http://localhost:8800/common/redirect.py?location=/resource-timing/resources/blank_page_green.htm is expected to have initiatorType iframe 7 PASS http://localhost:8800/common/redirect.py?location=/resource-timing/resources/blank_page_green.htm?id=xhr is expected to have initiatorType xmlhttprequest 8 PASS http://localhost:8800/common/redirect.py?location=/resource-timing/resources/blue.png is expected to have initiatorType img 9 PASS http://localhost:8800/common/redirect.py?location=/resource-timing/resources/empty_script.js is expected to have initiatorType script 10 PASS http://localhost:8800/common/redirect.py?location=/resource-timing/resources/resource_timing_test0.css is expected to have initiatorType link 6 PASS Testing resource entries 11 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_script_types-expected.txt
r236402 r239959 4 4 5 5 6 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=1 is expected to have initiatorType script 7 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=2 is expected to have initiatorType script 8 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=3 is expected to have initiatorType script 9 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=4 is expected to have initiatorType script 10 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=5 is expected to have initiatorType script 11 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=6 is expected to have initiatorType script 12 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=7 is expected to have initiatorType script 13 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=8 is expected to have initiatorType script 14 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=9 is expected to have initiatorType script 6 PASS Testing resource entries 15 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing.worker-expected.txt
r236402 r239959 1 1 2 PASS Performance Resou ce Entries in workers2 PASS Performance Resource Entries in workers 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing.worker.js
r236402 r239959 60 60 t.done(); 61 61 }); 62 }, "Performance Resou ce Entries in workers");62 }, "Performance Resource Entries in workers"); 63 63 64 64 done(); -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/iframe-setdomain.sub.html
r239958 r239959 2 2 <html> 3 3 <head> 4 <title>domain: {{domains[ www]}}</title>4 <title>domain: {{domains[]}}</title> 5 5 </head> 6 6 <body> 7 7 <script> 8 8 // The purpose of this IFrame is to change the 'document.domain' 9 document.domain = "{{domains[ www]}}";9 document.domain = "{{domains[]}}"; 10 10 </script> 11 The resource-timings .html test loads this document into an IFrame to vet that setting11 The resource-timings-level1.sub.html test loads this document into an IFrame to vet that setting 12 12 'document.domain' does not effect the timing allowed. 13 13 </body> -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/w3c-import.log
r236402 r239959 19 19 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/blank_page_green.htm 20 20 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/blue.png 21 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/buffer-full-utilities.js 22 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/document-domain-no-impact.sub.html 21 23 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/empty.js 22 24 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/empty.py … … 27 29 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/green_frame.htm 28 30 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/gzip_xml.py 31 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/iframe-setdomain.sub.html 29 32 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/iframe_TAO_match_origin.html 30 33 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/iframe_TAO_match_wildcard.html -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/webperftestharness.js
r204976 r239959 1 // 1 /* 2 author: W3C http://www.w3.org/ 3 help: http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute 4 */ 5 // 2 6 // Helper Functions for NavigationTiming W3C tests 3 7 // … … 46 50 { 47 51 // show a single error that window.performance is undefined 48 test(function() { assert_true(performanceNamespace !== undefined && performanceNamespace != null, "window.performance is defined and not null"); }, "window.performance is defined and not null.", {author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "}); 52 // The window.performance attribute provides a hosting area for performance related attributes. 53 test(function() { assert_true(performanceNamespace !== undefined && performanceNamespace != null, "window.performance is defined and not null"); }, "window.performance is defined and not null."); 49 54 } 50 55 } … … 57 62 if (skip_root === undefined) { 58 63 var msg = 'window.performance is defined'; 59 wp_test(function () { assert_true(performanceNamespace !== undefined, msg); }, msg,{author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "}); 64 // The window.performance attribute provides a hosting area for performance related attributes. 65 wp_test(function () { assert_true(performanceNamespace !== undefined, msg); }, msg); 60 66 } 61 67 62 68 if (child_name !== undefined) { 63 69 var msg2 = 'window.performance.' + child_name + ' is defined'; 64 wp_test(function() { assert_true(performanceNamespace[child_name] !== undefined, msg2); }, msg2,{author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "}); 70 // The window.performance attribute provides a hosting area for performance related attributes. 71 wp_test(function() { assert_true(performanceNamespace[child_name] !== undefined, msg2); }, msg2); 65 72 } 66 73 } -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/webperftestharnessextension.js
r210823 r239959 50 50 function test_resource_entries(entries, expected_entries) 51 51 { 52 // This is slightly convoluted so that we can sort the output. 53 var actual_entries = {}; 54 var origin = window.location.protocol + "//" + window.location.host; 55 56 for (var i = 0; i < entries.length; ++i) { 57 var entry = entries[i]; 58 var found = false; 59 for (var expected_entry in expected_entries) { 60 if (entry.name == origin + expected_entry) { 61 found = true; 62 if (expected_entry in actual_entries) { 63 test_fail(expected_entry + ' is not expected to have duplicate entries'); 52 test(function() { 53 // This is slightly convoluted so that we can sort the output. 54 var actual_entries = {}; 55 var origin = window.location.protocol + "//" + window.location.host; 56 57 for (var i = 0; i < entries.length; ++i) { 58 var entry = entries[i]; 59 var found = false; 60 for (var expected_entry in expected_entries) { 61 if (entry.name == origin + expected_entry) { 62 found = true; 63 if (expected_entry in actual_entries) { 64 assert_unreached(expected_entry + ' is not expected to have duplicate entries'); 65 } 66 actual_entries[expected_entry] = entry; 67 break; 64 68 } 65 actual_entries[expected_entry] = entry; 66 break; 67 } 68 } 69 if (!found) { 70 test_fail(entries[i].name + ' is not expected to be in the Resource Timing buffer'); 71 } 72 } 73 74 sorted_urls = []; 75 for (var i in actual_entries) { 76 sorted_urls.push(i); 77 } 78 sorted_urls.sort(); 79 for (var i in sorted_urls) { 80 var url = sorted_urls[i]; 81 test_equals(actual_entries[url].initiatorType, 82 expected_entries[url], 83 origin + url + ' is expected to have initiatorType ' + expected_entries[url]); 84 } 85 for (var j in expected_entries) { 86 if (!(j in actual_entries)) { 87 test_fail(origin + j + ' is expected to be in the Resource Timing buffer'); 88 } 89 } 90 } 69 } 70 if (!found) { 71 assert_unreached(entries[i].name + ' is not expected to be in the Resource Timing buffer'); 72 } 73 } 74 75 sorted_urls = []; 76 for (var i in actual_entries) { 77 sorted_urls.push(i); 78 } 79 sorted_urls.sort(); 80 for (var i in sorted_urls) { 81 var url = sorted_urls[i]; 82 assert_equals(actual_entries[url].initiatorType, 83 expected_entries[url], 84 origin + url + ' is expected to have initiatorType ' + expected_entries[url]); 85 } 86 for (var j in expected_entries) { 87 if (!(j in actual_entries)) { 88 assert_unreached(origin + j + ' is expected to be in the Resource Timing buffer'); 89 } 90 } 91 }, "Testing resource entries"); 92 } 93 91 94 function performance_entrylist_checker(type) 92 95 { -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/single-entry-per-resource.html
r222307 r239959 14 14 var entries = entryList.getEntriesByType("resource"); 15 15 for (var i = 0; i < entries.length; ++i) { 16 // Ignore any entries for the test harness files if present. 17 if (/testharness(report)?\.js/.test(entries[i].name)) { 18 continue; 19 } 20 16 21 ++observed; 17 22 if (entries[i].name.indexOf(img_url) != -1) -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/test_resource_timing.js
r230445 r239959 187 187 assert_equals(entries.length, 1, 'There should be a single matching entry'); 188 188 const actual = entries[0]; 189 190 // Debugging bug 1263428 191 // Feel free to remove/overwrite this piece of code 192 if (actual.connectStart < actual.domainLookupEnd) { 193 assert_true(false, "actual: "+JSON.stringify(actual)); 189 if (window.location.protocol == "http:") { 190 assert_equals(actual.secureConnectionStart, 0, 'secureConnectionStart should be 0 in http'); 191 } else { 192 assert_greater_than(actual.secureConnectionStart, 0, 'secureConnectionStart should not be 0 in https'); 194 193 } 195 194 196 195 assert_equals(actual.redirectStart, 0, 'redirectStart should be 0'); 197 196 assert_equals(actual.redirectEnd, 0, 'redirectEnd should be 0'); 198 assert_true(actual.secureConnectionStart == undefined ||199 actual.secureConnectionStart == 0, 'secureConnectionStart should be 0 or undefined');200 197 assert_equals(actual.fetchStart, actual.startTime, 'fetchStart is equal to startTime'); 201 198 assert_greater_than_equal(actual.domainLookupStart, actual.fetchStart, 'domainLookupStart after fetchStart'); … … 203 200 assert_greater_than_equal(actual.connectStart, actual.domainLookupEnd, 'connectStart after domainLookupEnd'); 204 201 assert_greater_than_equal(actual.connectEnd, actual.connectStart, 'connectEnd after connectStart'); 202 assert_true(actual.secureConnectionStart == 0 || actual.secureConnectionStart <= actual.requestStart, 203 "secureConnectionStart should be either 0 or smaller than/equals to requestStart") 205 204 assert_greater_than_equal(actual.requestStart, actual.connectEnd, 'requestStart after connectEnd'); 206 205 assert_greater_than_equal(actual.responseStart, actual.requestStart, 'responseStart after requestStart'); -
trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/w3c-import.log
r236402 r239959 17 17 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/META.yml 18 18 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/SyntheticResponse.py 19 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-add-after-full-event.html 20 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-that-drop.html 21 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-add-entries-during-callback.html 22 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-add-then-clear.html 23 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-decrease-buffer-during-callback.html 24 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback.html 25 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback.html 26 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-set-to-current-buffer.html 27 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback.html 28 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-then-increased.html 29 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-when-populate-entries.html 19 30 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/clear_resource_timing_functionality.html 31 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/document-domain-no-impact-loader.sub.html 20 32 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/idlharness.any.js 21 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/iframe-setdomain.sub.html 33 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/no-entries-for-cross-origin-css-fetched.sub.html 34 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.js 35 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.sub.html 22 36 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing-tojson.html 23 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing.html24 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing.js25 37 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain.html 26 38 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_match_origin.htm … … 36 48 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_cached.htm 37 49 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse.html 50 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse.https.html 38 51 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_dedicated_worker.html 39 52 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_dynamic_insertion.html … … 49 62 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_TAO_cross_origin_redirect.html 50 63 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_buffer_full_eventually.html 51 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_buffer_full_when_populate_entries.html52 64 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_buffer_full_when_shrink_buffer_size.html 53 65 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect.html 54 66 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html 55 67 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_same_origin_redirect.html 56 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback.html57 68 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/single-entry-per-resource.html 69 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/supported_resource_type.any.js 58 70 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html 71 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/test_resource_timing.https.html 59 72 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/test_resource_timing.js -
trunk/LayoutTests/tests-options.json
r239693 r239959 1533 1533 "slow" 1534 1534 ], 1535 "imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.sub.html": [ 1536 "slow" 1537 ], 1535 1538 "imported/w3c/web-platform-tests/resource-timing/single-entry-per-resource.html": [ 1536 1539 "slow"
Note: See TracChangeset
for help on using the changeset viewer.