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 <script> |
| 11 var navigation_frame; |
| 12 var pnt1; |
| 13 var step = 1; |
| 14 function onload_test() |
| 15 { |
| 16 navigation_frame = document.getElementById("frameContext").conte
ntWindow; |
| 17 setTimeout("nav_frame();", 0); |
| 18 } |
| 19 |
| 20 function nav_frame() |
| 21 { |
| 22 switch (step) |
| 23 { |
| 24 case 1: |
| 25 { |
| 26 pnt1 = navigation_frame.performance.getEntriesByType("na
vigation")[0]; |
| 27 navigation_frame.location.href = '/navigation-timing/res
ources/blank_page_green_with_onunload.html'; |
| 28 step++; |
| 29 break; |
| 30 } |
| 31 case 2: |
| 32 { |
| 33 navigation_frame.history.back(); |
| 34 step++; |
| 35 break; |
| 36 } |
| 37 case 3: |
| 38 { |
| 39 var pnt2 = navigation_frame.performance.getEntriesByType
("navigation")[0]; |
| 40 assert_equals(pnt1.type, "navigate"); |
| 41 assert_equals(pnt2.type, "back_forward"); |
| 42 done(); |
| 43 break; |
| 44 } |
| 45 default: |
| 46 break; |
| 47 } |
| 48 } |
| 49 </script> |
| 50 </head> |
| 51 <body> |
| 52 <h1> |
| 53 Description</h1> |
| 54 <p> |
| 55 This test validates that a PerformanceNavigatingTiming corresponding
to a detached document can't access a different document's state. </p> |
| 56 <iframe id="frameContext" onload="onload_test();" src="resources/blank_p
age_yellow_with_onunload.html" style="width: 250px; height: 250px;"></iframe> |
| 57 </body> |
| 58 </html> |
OLD | NEW |