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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_redirect_xserver_opt_in.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 verifyTimingEventOrder(eventOrder, timingEntry) {
14 for (var i = 0; i < eventOrder.length - 1; i++) {
15 assert_true(timingEntry[eventOrder[i]] < timingEntry[eventOr der[i + 1]],
16 "Expected " + eventOrder[i] + " to be no greater than " + eventOrder[i + 1] + ".");
17 }
18 }
19
20 function onload_test()
21 {
22 var frame_performance = document.getElementById("frameContext"). contentWindow.performance;
23 assert_equals(frame_performance.getEntriesByType("navigation")[0 ].type,
24 "navigate",
25 "Expected navigation type to be navigate.");
26 assert_equals(frame_performance.getEntriesByType("navigation")[0 ].redirectCount, 1, "Expected redirectCount to be 1.");
27
28 var timgingEvents = [
29 'startTime',
30 'redirectStart',
31 'redirectEnd',
32 ];
33 verifyTimingEventOrder(timgingEvents, frame_performance.getEntri esByType("navigation")[0]);
34 done();
35 }
36 </script>
37
38 </head>
39 <body>
40 <h1>Description</h1>
41 <p>This test validates the values of the window.performance.getEntriesBy Type("navigation")[0].redirectCount and the
42 window.performance.getEntriesByType("navigation")[0].redirectStart/En d times for a cross-origin server side redirect navigation when the redirect cho oses to opt-in.</p>
43
44 <iframe id="frameContext" src="" style="width: 250px; height: 250px;"></ iframe>
45 <script>
46 // combine the page origin and redirect origin into the IFRAME's src URL
47 var destUrl = make_absolute_url({subdomain: "www",
48 path: "/common/redirect-opt-in.py",
49 query: "location=" + make_absolute_ url(
50 {path: "/navigation-tim ing/resources/blank_page_green.html"})
51 });
52 var frameContext = document.getElementById("frameContext");
53 frameContext.onload = onload_test;
54 frameContext.src = destUrl;
55 </script>
56 </body>
57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698