OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <meta charset="utf-8" /> |
| 5 <title>Navigation Timing 2 WPT</title> |
| 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 |
| 11 <script> |
| 12 |
| 13 function onload_test() |
| 14 { |
| 15 var frame = document.getElementById("frameContext"); |
| 16 |
| 17 assert_equals(frame.contentWindow.performance.getEntriesByType("
navigation")[0].type, |
| 18 "navigate", |
| 19 "Expected navigation type to be navigate."); |
| 20 |
| 21 assert_equals(frame.contentWindow.performance.getEntriesByType("
navigation")[0].unloadEventStart, 0, |
| 22 "Expected unloadEventStart to be 0."); |
| 23 assert_equals(frame.contentWindow.performance.getEntriesByType("
navigation")[0].unloadEventEnd, 0, |
| 24 "Expected unloadEventEnd to be 0."); |
| 25 done(); |
| 26 } |
| 27 </script> |
| 28 |
| 29 </head> |
| 30 <body> |
| 31 <h1>Description</h1> |
| 32 <p>This test validates the unload event times are 0 when there is no pre
vious document.</p> |
| 33 |
| 34 <iframe id="frameContext" onload="onload_test();" src="resources/blank_p
age_green.html" style="width: 250px; height: 250px;"></iframe> |
| 35 </body> |
| 36 </html> |
OLD | NEW |