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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/navigation-timing/idlharness.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 IDL tests</title>
6 <link rel="author" title="W3C" href="http://www.w3.org/" />
7 <link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-ti ming-interface"/>
8 <link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-navigation-in fo-interface"/>
9 <link rel="help" href="http://www.w3.org/TR/navigation-timing/#sec-window.perfor mance-attribute"/>
10 <script src="/resources/testharness.js"></script>
11 <script src="/resources/testharnessreport.js"></script>
12 <script src="/resources/WebIDLParser.js"></script>
13 <script src="/resources/idlharness.js"></script>
14 </head>
15 <body>
16 <h1>Navigation Timing IDL tests</h1>
17 <div id="log"></div>
18
19 <pre id='untested_idl' style='display:none'>
20
21 [PrimaryGlobal]
22 interface Window {
23 };
24
25 callback interface EventListener {
26 void handleEvent(Event event);
27 };
28
29 interface Event {
30 // PhaseType
31 const unsigned short NONE = 0;
32 const unsigned short CAPTURING_PHASE = 1;
33 const unsigned short AT_TARGET = 2;
34 const unsigned short BUBBLING_PHASE = 3;
35 readonly attribute DOMString type;
36 readonly attribute EventTarget? target;
37 readonly attribute EventTarget? currentTarget;
38 readonly attribute unsigned short eventPhase;
39 readonly attribute boolean bubbles;
40 readonly attribute boolean cancelable;
41 readonly attribute DOMTimeStamp timeStamp;
42 void stopPropagation ();
43 void preventDefault ();
44 void initEvent (DOMString eventTypeArg, boolean bubblesArg, boolean cancelab leArg);
45 // Introduced in DOM Level 3
46 void stopImmediatePropagation ();
47 readonly attribute boolean defaultPrevented;
48 readonly attribute boolean isTrusted;
49 };
50
51 interface EventTarget {
52 // Modified in DOM Level 3
53 void addEventListener (DOMString type, EventListener? listener, optional boolean useCapture = false);
54 void removeEventListener (DOMString type, EventListener? listener, option al boolean useCapture = false);
55 boolean dispatchEvent (Event event);
56 };
57
58 </pre>
59
60 <pre id='idl'>
61 interface PerformanceTiming {
62 readonly attribute unsigned long long navigationStart;
63 readonly attribute unsigned long long unloadEventStart;
64 readonly attribute unsigned long long unloadEventEnd;
65 readonly attribute unsigned long long redirectStart;
66 readonly attribute unsigned long long redirectEnd;
67 readonly attribute unsigned long long fetchStart;
68 readonly attribute unsigned long long domainLookupStart;
69 readonly attribute unsigned long long domainLookupEnd;
70 readonly attribute unsigned long long connectStart;
71 readonly attribute unsigned long long connectEnd;
72 readonly attribute unsigned long long secureConnectionStart;
73 readonly attribute unsigned long long requestStart;
74 readonly attribute unsigned long long responseStart;
75 readonly attribute unsigned long long responseEnd;
76 readonly attribute unsigned long long domLoading;
77 readonly attribute unsigned long long domInteractive;
78 readonly attribute unsigned long long domContentLoadedEventStart;
79 readonly attribute unsigned long long domContentLoadedEventEnd;
80 readonly attribute unsigned long long domComplete;
81 readonly attribute unsigned long long loadEventStart;
82 readonly attribute unsigned long long loadEventEnd;
83 };
84
85 interface PerformanceNavigation {
86 const unsigned short TYPE_NAVIGATE = 0;
87 const unsigned short TYPE_RELOAD = 1;
88 const unsigned short TYPE_BACK_FORWARD = 2;
89 const unsigned short TYPE_RESERVED = 255;
90 readonly attribute unsigned short type;
91 readonly attribute unsigned short redirectCount;
92 };
93
94 interface Performance : EventTarget {
95 readonly attribute PerformanceTiming timing;
96 readonly attribute PerformanceNavigation navigation;
97 };
98
99 partial interface Window {
100 [Replaceable] readonly attribute Performance performance;
101 };
102 </pre>
103
104 <script>
105 (function() {
106 var idl_array = new IdlArray();
107
108 idl_array.add_untested_idls(document.getElementById("untested_idl").textConten t);
109 idl_array.add_idls(document.getElementById("idl").textContent);
110
111 idl_array.add_objects({Window: ["window"],
112 Performance: ["window.performance"],
113 PerformanceNavigation: ["window.performance.navigation" ],
114 PerformanceTiming: ["window.performance.timing"]});
115
116 idl_array.test();
117 })();
118 </script>
119 </body>
120 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698