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

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

Issue 2774543003: Fix PerformanceNavigationTiming accessor behavior after document detach. (Closed)
Patch Set: add layout test Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_frame_removed.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/#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 if (step === 1) {
18 pnt1 = navigation_frame.performance.getEntriesByType("navigati on")[0];
Nate Chapin 2017/03/27 21:44:35 Nit: move this to the case 1 in the switch stateme
sunjian 2017/03/27 23:07:05 Done.
19 }
20 setTimeout("nav_frame();", 100);
Nate Chapin 2017/03/27 21:44:35 Is a 100ms setTimeout() necessary? At least in chr
sunjian 2017/03/27 23:07:05 Acknowledged.
21 }
22
23 function nav_frame()
24 {
25 switch (step)
26 {
27 case 1:
28 {
29 navigation_frame.location.href = '/navigation-timing/res ources/blank_page_green_with_onunload.html';
30 step++;
31 break;
32 }
33 case 2:
34 {
35 navigation_frame.history.back();
36 step++;
37 break;
38 }
39 case 3:
40 {
41 var pnt2 = navigation_frame.performance.getEntriesByType ("navigation")[0];
42 assert_equals(pnt1.type, "navigate");
43 assert_equals(pnt2.type, "back_forward");
44 done();
45 break;
46 }
47 default:
48 break;
49 }
50 }
51 </script>
52 </head>
53 <body>
54 <h1>
55 Description</h1>
56 <p>
57 This test validates two different PerformanceNavigationTiming instan ces don't reference the same DocumentLoader when computing their
Nate Chapin 2017/03/27 21:44:35 This test will get upstreamed to wpt, right? You p
sunjian 2017/03/27 23:07:05 Acknowledged.
58 type field </p>
59 <iframe id="frameContext" onload="onload_test();" src="resources/blank_p age_yellow_with_onunload.html" style="width: 250px; height: 250px;"></iframe>
60 </body>
61 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_frame_removed.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698