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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/navigation-timing/nav2_test_attributes_exist.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 </head>
11 <body>
12 <h1>Description</h1>
13 <p>This test validates that PerformanceObserver can observe nav timing 2 instance and that the expected attributes in nav timing 2 instance exist (but d oes not validate that the values are correct).</p>
14
15 <script>
16 var navTiming2Attributes = [
17 'connectEnd',
18 'connectStart',
19 'decodedBodySize',
20 'domComplete',
21 'domContentLoadedEventEnd',
22 'domContentLoadedEventStart',
23 'domInteractive',
24 'domainLookupEnd',
25 'domainLookupStart',
26 'duration',
27 'encodedBodySize',
28 'entryType',
29 'fetchStart',
30 'initiatorType',
31 'loadEventEnd',
32 'loadEventStart',
33 'name',
34 'redirectCount',
35 'redirectEnd',
36 'redirectStart',
37 'requestStart',
38 'responseEnd',
39 'responseStart',
40 'secureConnectionStart',
41 'transferSize',
42 'type',
43 'unloadEventEnd',
44 'unloadEventStart',
45 'workerStart'
46 ];
47 async_test(function (t) {
48 var observer = new PerformanceObserver(
49 t.step_func(function (entryList) {
50 var entries = entryList.getEntries();
51 assert_equals(entries.length, 1,
52 "There should be only one navigation timing instance.");
53 for (var i = 0; i < navTiming2Attributes.length; i++) {
54 assert_true(navTiming2Attributes[i] in entries[0],
55 "Expected attribute: " + navTiming2Attributes[i] + " .");
56 }
57 observer.disconnect();
58 t.done();
59 })
60 );
61 observer.observe({entryTypes: ["navigation"]});
62
63 }, "Performance navigation timing entries are observable.");
64 </script>
65 </body>
66 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698