OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <meta charset="utf-8" /> |
| 5 <title>window.performance.timing attributes on an initial navigation</ti
tle> |
| 6 <link rel="author" title="Google" href="http://www.google.com/" /> |
| 7 <link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navig
ation-timing-interface"/> |
| 8 <script src="/resources/testharness.js"></script> |
| 9 <script src="/resources/testharnessreport.js"></script> |
| 10 <script src="resources/webperftestharness.js"></script> |
| 11 |
| 12 <script> |
| 13 setup({explicit_done: true}); |
| 14 |
| 15 var frame; |
| 16 function onload_test() |
| 17 { |
| 18 frame = document.getElementById("frameContext"); |
| 19 test_namespace('navigation'); |
| 20 if (performanceNamespace) |
| 21 { |
| 22 test_true(frame.contentWindow.performance.navigation.type ==
performanceNamespace.navigation.TYPE_NAVIGATE, |
| 23 'timing.navigation.type is TYPE_NAVIGATE',{help:"h
ttp://www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"}); |
| 24 |
| 25 test_equals(frame.contentWindow.performance.timing.unloadEve
ntStart, 0, 'timing.unloadEventStart == 0 on navigation with no previous documen
t'); |
| 26 test_equals(frame.contentWindow.performance.timing.unloadEve
ntEnd, 0, 'timing.unloadEventEnd == 0 navigation with no previous document'); |
| 27 } |
| 28 done(); |
| 29 } |
| 30 </script> |
| 31 |
| 32 </head> |
| 33 <body onload="onload_test();"> |
| 34 <h1>Description</h1> |
| 35 <p>This test validates the unload event times are 0 when there is no pre
vious document.</p> |
| 36 |
| 37 <div id="log"></div><br /> |
| 38 <iframe id="frameContext" src="resources/blank_page_green.html" style="w
idth: 250px; height: 250px;"></iframe> |
| 39 </body> |
| 40 </html> |
OLD | NEW |