| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta charset="utf-8" /> | 4 <meta charset="utf-8" /> |
| 5 <title>resource timing information for cross-origin resource request</ti
tle> | 5 <title>This test validates the values in resource timing for a cross-ori
gin resource request.</title> |
| 6 <link rel="author" title="Intel" href="http://www.intel.com/" /> | 6 <link rel="author" title="Intel" href="http://www.intel.com/" /> |
| 7 <link rel="help" href="http://www.w3.org/TR/resource-timing/#performance
resourcetiming"/> | 7 <link rel="help" href="http://www.w3.org/TR/resource-timing/#performance
resourcetiming"/> |
| 8 <script src="/w3c/resources/testharness.js"></script> | 8 <script src="/w3c/resources/testharness.js"></script> |
| 9 <script src="/w3c/resources/testharnessreport.js"></script> | 9 <script src="/w3c/resources/testharnessreport.js"></script> |
| 10 <script src="/w3c/webperf/resources/webperftestharness.js"></script> | 10 <script src="/w3c/webperf/resources/webperftestharness.js"></script> |
| 11 <script src="/w3c/webperf/resources/webperftestharnessextension.js"></sc
ript> | 11 <script src="/w3c/webperf/resources/webperftestharnessextension.js"></sc
ript> |
| 12 | 12 |
| 13 <script> | 13 <script> |
| 14 | 14 |
| 15 setup({explicit_done: true}); | 15 setup({explicit_done: true}); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 33 test_equals(entry.secureConnectionStart, 0, "secureConnectionSta
rt should be 0 in cross-origin request!"); | 33 test_equals(entry.secureConnectionStart, 0, "secureConnectionSta
rt should be 0 in cross-origin request!"); |
| 34 test_greater_than(entry.fetchStart, 0, "fetchStart should be gre
ater than 0 in cross-origin request!"); | 34 test_greater_than(entry.fetchStart, 0, "fetchStart should be gre
ater than 0 in cross-origin request!"); |
| 35 test_greater_than(entry.responseEnd, 0, "responseEnd should be g
reater than 0 in cross-origin request!"); | 35 test_greater_than(entry.responseEnd, 0, "responseEnd should be g
reater than 0 in cross-origin request!"); |
| 36 done(); | 36 done(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 </script> | 39 </script> |
| 40 | 40 |
| 41 </head> | 41 </head> |
| 42 <body> | 42 <body> |
| 43 <h1>Description</h1> | |
| 44 <p>This test validates the values in resource timing for a cross-origin
resource request.</p> | |
| 45 | |
| 46 <br /> | |
| 47 <iframe id="frameContext" src="" style="width: 250px; height: 250px;"></
iframe> | 43 <iframe id="frameContext" src="" style="width: 250px; height: 250px;"></
iframe> |
| 48 <script> | 44 <script> |
| 49 test_equals(document.location.host, pageOrigin, 'Starting document.l
ocation.hostname is correct (' + pageOrigin + ')'); | 45 test_equals(document.location.host, pageOrigin, 'Starting document.l
ocation.hostname is correct (' + pageOrigin + ')'); |
| 50 var destUrl = 'http://' + crossOrigin + '/w3c/webperf/resources/blan
k_page_green.htm'; | 46 var destUrl = 'http://' + crossOrigin + '/w3c/webperf/resources/blan
k_page_green.htm'; |
| 51 | 47 |
| 52 var frameContext = document.getElementById("frameContext"); | 48 var frameContext = document.getElementById("frameContext"); |
| 53 frameContext.onload = onload_test; | 49 frameContext.onload = onload_test; |
| 54 frameContext.src = destUrl; | 50 frameContext.src = destUrl; |
| 55 </script> | 51 </script> |
| 56 </body> | 52 </body> |
| 57 </html> | 53 </html> |
| OLD | NEW |