OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <meta charset="utf-8" /> |
| 5 <title>window.performance.timing.redirect attributes on a client redirec
t navigation</title> |
| 6 <link rel="author" title="Microsoft" href="http://www.microsoft.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 <script> |
| 12 setup({explicit_done: true}); |
| 13 |
| 14 test_namespace('navigation'); |
| 15 test_namespace('timing', true); |
| 16 |
| 17 var redirect_frame; |
| 18 function onload_test() |
| 19 { |
| 20 if (performanceNamespace === undefined) |
| 21 { |
| 22 // avoid script errors |
| 23 done(); |
| 24 return; |
| 25 } |
| 26 |
| 27 redirect_frame = document.getElementById("frameContext"); |
| 28 redirect_frame.onload = do_test; |
| 29 } |
| 30 |
| 31 function do_test() |
| 32 { |
| 33 redirect_frame.onload = ""; |
| 34 test_true(redirect_frame.contentWindow.performance.navigation.ty
pe == performanceNamespace.navigation.TYPE_NAVIGATE, |
| 35 'timing.navigation.type is TYPE_NAVIGATE',{help:"http:
//www.w3.org/TR/navigation-timing/#sec-navigation-info-interface"}); |
| 36 |
| 37 test_equals(redirect_frame.contentWindow.performance.navigation.
redirectCount, 0, 'navigation.redirectCount == 0 on an client redirected navigat
ion',{help:"http://www.w3.org/TR/navigation-timing/#sec-navigation-info-interfac
e"}); |
| 38 test_equals(redirect_frame.contentWindow.performance.timing.redi
rectStart, 0, 'timing.redirectStart == 0 on an client redirected navigation'); |
| 39 test_equals(redirect_frame.contentWindow.performance.timing.redi
rectEnd, 0, 'timing.redirectEnd == 0 on an client redirected navigation'); |
| 40 |
| 41 done(); |
| 42 } |
| 43 </script> |
| 44 |
| 45 </head> |
| 46 <body onload="onload_test();"> |
| 47 <h1>Description</h1> |
| 48 <p>This test validates the values of the window.navigation.redirectCount
and the |
| 49 window.performance.timing.redirectStart/End times on a client side re
direct.</p> |
| 50 |
| 51 <div id="log"></div><br /> |
| 52 <iframe id="frameContext" src="resources/blank_page_meta_redirect.html"
style="width: 250px; height: 250px;"></iframe> |
| 53 </body> |
| 54 </html> |
OLD | NEW |