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

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

Issue 2675973004: Update NT2 name to be the requested URL instead of 'document' (Closed)
Patch Set: fix failing wpt tests (imported after creation of this CL), and delete a redundant, old test 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <title>Navigation Timing 2 WPT</title> 5 <title>Navigation Timing 2 WPT</title>
6 <link rel="author" title="Google" href="http://www.google.com/" /> 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"/> 7 <link rel="help" href="http://www.w3.org/TR/navigation-timing-2/#sec-Per formanceNavigationTiming"/>
8 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharness.js"></script>
9 <script src="/resources/testharnessreport.js"></script> 9 <script src="/resources/testharnessreport.js"></script>
10 </head> 10 </head>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 'unloadEventEnd', 43 'unloadEventEnd',
44 'unloadEventStart', 44 'unloadEventStart',
45 'workerStart' 45 'workerStart'
46 ]; 46 ];
47 47
48 async_test(function (t) { 48 async_test(function (t) {
49 var observer = new PerformanceObserver( 49 var observer = new PerformanceObserver(
50 t.step_func(function (entryList) { 50 t.step_func(function (entryList) {
51 var instance1 = performance.getEntries()[0]; 51 var instance1 = performance.getEntries()[0];
52 var instance2 = performance.getEntriesByType("navigation")[0 ]; 52 var instance2 = performance.getEntriesByType("navigation")[0 ];
53 var instance3 = performance.getEntriesByName("document")[0]; 53 var instance3 = performance.getEntriesByName("http://web-pla tform.test:8001/navigation-timing/nav2_test_instance_accessors.html")[0];
54 54
55 assert_equals(performance.getEntriesByType("navigation").len gth, 1, "Expected there is only one navigation timing instance."); 55 assert_equals(performance.getEntriesByType("navigation").len gth, 1, "Expected there is only one navigation timing instance.");
56 assert_equals(performance.getEntriesByName("document").lengt h, 1, "Expected there is only one navigation timing instance."); 56 assert_equals(performance.getEntriesByName("http://web-platf orm.test:8001/navigation-timing/nav2_test_instance_accessors.html").length, 1, " Expected there is only one navigation timing instance.");
57 57
58 for (var i = 0; i < navTiming2Attributes.length; i++) { 58 for (var i = 0; i < navTiming2Attributes.length; i++) {
59 assert_equals(instance1[navTiming2Attributes[i]], instan ce2[navTiming2Attributes[i]]); 59 assert_equals(instance1[navTiming2Attributes[i]], instan ce2[navTiming2Attributes[i]]);
60 } 60 }
61 61
62 for (var i = 0; i < navTiming2Attributes.length; i++) { 62 for (var i = 0; i < navTiming2Attributes.length; i++) {
63 assert_equals(instance1[navTiming2Attributes[i]], instan ce3[navTiming2Attributes[i]]); 63 assert_equals(instance1[navTiming2Attributes[i]], instan ce3[navTiming2Attributes[i]]);
64 } 64 }
65 observer.disconnect(); 65 observer.disconnect();
66 t.done(); 66 t.done();
67 }) 67 })
68 ); 68 );
69 observer.observe({entryTypes: ["navigation"]}); 69 observer.observe({entryTypes: ["navigation"]});
70 70
71 }, "Performance navigation timing entries are accessible through three d ifferent accessors."); 71 }, "Performance navigation timing entries are accessible through three d ifferent accessors.");
72 </script> 72 </script>
73 </body> 73 </body>
74 </html> 74 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698