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-2/#sec-Per
formanceNavigationTiming"/> |
| 8 <script src="/resources/testharness.js"></script> |
| 9 <script src="/resources/testharnessreport.js"></script> |
| 10 </head> |
| 11 <body> |
| 12 <h1>Description</h1> |
| 13 <p>This test validates that the value of the window.performance.getEntri
esByType("navigation")[0].redirectCount attribute, as well as the window.perform
ance.getEntriesByType("navigation")[0].redirectStart and redirectEnd attributes
on a non-redirected navigation.</p> |
| 14 |
| 15 <script> |
| 16 |
| 17 async_test(function (t) { |
| 18 var observer = new PerformanceObserver( |
| 19 t.step_func(function (entryList) { |
| 20 var navTiming = performance.getEntriesByType("navigation")[0
]; |
| 21 assert_equals(navTiming.redirectCount, 0, "Expected redirect
Count to be 0."); |
| 22 assert_equals(navTiming.redirectStart, 0, "Expected redirect
Start to be 0."); |
| 23 assert_equals(navTiming.redirectEnd, 0, "Expected redirectEn
d to be 0."); |
| 24 observer.disconnect(); |
| 25 t.done(); |
| 26 }) |
| 27 ); |
| 28 observer.observe({entryTypes: ["navigation"]}); |
| 29 |
| 30 }, "Naivation without redirects."); |
| 31 </script> |
| 32 </body> |
| 33 </html> |
OLD | NEW |