xhr-resource-timing.html (1028B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8" /> 5 <title>This test validates that a failed cross-origin fetch creates an opaque network timing entry. 6 </title> 7 <link rel="author" title="Noam Rosenthal" href="noam@webkit.org"> 8 <link rel="help" href="https://www.w3.org/TR/resource-timing-2/#sec-performanceresourcetiming"/> 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 <script src="resources/resource-loaders.js"></script> 12 <script src="resources/entry-invariants.js"></script> 13 <script src="/common/get-host-info.sub.js"></script> 14 </head> 15 <body> 16 <script> 17 const {REMOTE_ORIGIN} = get_host_info(); 18 19 attribute_test( 20 load.xhr_async, "/common/dummy.xml", 21 invariants.assert_tao_pass_no_redirect_http, 22 "Verify resource timing entry creation for successful XHR"); 23 24 attribute_test( 25 load.xhr_async, `${REMOTE_ORIGIN}/common/dummy.xml`, 26 invariants.assert_tao_failure_resource, 27 "Verify resource timing entry creation for XHR failing with CORS"); 28 </script> 29 </body>