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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_unloadEvents_previous_document_cross_origin.sub.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>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 <script src="/common/utils.js"></script>
11 <script>
12
13 function onload_test()
14 {
15 var reload_frame = document.getElementById("frameContext");
16 reload_frame.onload = do_test;
17 reload_frame.contentWindow.location.href = "resources/blank_page _green.html";
18 }
19
20 function do_test()
21 {
22 var newNavTiming = document.getElementById("frameContext").conte ntWindow.performance.getEntriesByType("navigation")[0];
23 assert_equals(newNavTiming.type, "navigate", "Expected navigatio n type to be navigate.");
24 assert_equals(newNavTiming.unloadEventStart, 0, "Expected unload EventStart to be 0.");
25 assert_equals(newNavTiming.unloadEventEnd, 0, "Expected unloadEv entEnd to be 0.");
26 done();
27 }
28 </script>
29 </head>
30 <body>
31 <h1>Description</h1>
32 <p>This test validates the value of window.performance.getEntriesByType( "navigation")[0].(type/unloadEventEnd/unloadEventStart) with a navigation on top of a cross-origin document.</p>
33
34 <p>This page should be loaded with a green background frame below. The f rame will be automatically reloaded
35 and then verified that
36 <ul>
37 <li>The window.performance.getEntriesByType("navigation").type = "na vigate"</li>
38 <li>The window.performance.getEntriesByType("navigation").unloadEven tStart = 0</li>
39 <li>The window.performance.getEntriesByType("navigation").unloadEven tEnd = 0</li>
40 </ul>
41 </p>
42
43 <iframe id="frameContext" onload="onload_test();" src="{{location[scheme ]}}://{{domains[www2]}}:{{ports[http][0]}}/common/blank.html" style="width: 250p x; height: 250px;"></iframe>
44 </body>
45 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698