Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(549)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_timing_client_redirect.html

Issue 2676573004: Import wpt@6010f54a979d242f657b284bae53c2b218c533f4 (Closed)
Patch Set: Update test expectations and baselines. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698