Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326

This commit is contained in:
Josh Matthews 2017-10-12 09:25:50 -04:00
parent 462c272380
commit 1f531f66ea
5377 changed files with 174916 additions and 84369 deletions

View file

@ -17,47 +17,75 @@
<div id="log"></div>
<pre id='untested_idl' style='display:none'>
typedef double DOMHighResTimeStamp;
[PrimaryGlobal]
interface Window {
[Replaceable]
readonly attribute Performance performance;
};
callback interface EventListener {
void handleEvent(Event event);
[Exposed=(Window,Worker)]
interface Performance {
};
interface Event {
// PhaseType
const unsigned short NONE = 0;
const unsigned short CAPTURING_PHASE = 1;
const unsigned short AT_TARGET = 2;
const unsigned short BUBBLING_PHASE = 3;
readonly attribute DOMString type;
readonly attribute EventTarget? target;
readonly attribute EventTarget? currentTarget;
readonly attribute unsigned short eventPhase;
readonly attribute boolean bubbles;
readonly attribute boolean cancelable;
readonly attribute DOMTimeStamp timeStamp;
void stopPropagation ();
void preventDefault ();
void initEvent (DOMString eventTypeArg, boolean bubblesArg, boolean cancelableArg);
// Introduced in DOM Level 3
void stopImmediatePropagation ();
readonly attribute boolean defaultPrevented;
readonly attribute boolean isTrusted;
};
interface EventTarget {
// Modified in DOM Level 3
void addEventListener (DOMString type, EventListener? listener, optional boolean useCapture = false);
void removeEventListener (DOMString type, EventListener? listener, optional boolean useCapture = false);
boolean dispatchEvent (Event event);
};
[Exposed=(Window,Worker)]
interface PerformanceEntry {
readonly attribute DOMString name;
readonly attribute DOMString entryType;
readonly attribute DOMHighResTimeStamp startTime;
readonly attribute DOMHighResTimeStamp duration;
[Default] object toJSON();
};
[Exposed=(Window,Worker)]
interface PerformanceResourceTiming : PerformanceEntry {
readonly attribute DOMString initiatorType;
readonly attribute DOMString nextHopProtocol;
readonly attribute DOMHighResTimeStamp workerStart;
readonly attribute DOMHighResTimeStamp redirectStart;
readonly attribute DOMHighResTimeStamp redirectEnd;
readonly attribute DOMHighResTimeStamp fetchStart;
readonly attribute DOMHighResTimeStamp domainLookupStart;
readonly attribute DOMHighResTimeStamp domainLookupEnd;
readonly attribute DOMHighResTimeStamp connectStart;
readonly attribute DOMHighResTimeStamp connectEnd;
readonly attribute DOMHighResTimeStamp secureConnectionStart;
readonly attribute DOMHighResTimeStamp requestStart;
readonly attribute DOMHighResTimeStamp responseStart;
readonly attribute DOMHighResTimeStamp responseEnd;
readonly attribute unsigned long long transferSize;
readonly attribute unsigned long long encodedBodySize;
readonly attribute unsigned long long decodedBodySize;
[Default] object toJSON();
};
</pre>
<pre id='idl'>
[Exposed=Window]
interface PerformanceNavigationTiming : PerformanceResourceTiming {
readonly attribute DOMHighResTimeStamp unloadEventStart;
readonly attribute DOMHighResTimeStamp unloadEventEnd;
readonly attribute DOMHighResTimeStamp domInteractive;
readonly attribute DOMHighResTimeStamp domContentLoadedEventStart;
readonly attribute DOMHighResTimeStamp domContentLoadedEventEnd;
readonly attribute DOMHighResTimeStamp domComplete;
readonly attribute DOMHighResTimeStamp loadEventStart;
readonly attribute DOMHighResTimeStamp loadEventEnd;
readonly attribute NavigationType type;
readonly attribute unsigned short redirectCount;
[Default] object toJSON();
};
enum NavigationType {
"navigate",
"reload",
"back_forward",
"prerender"
};
[Exposed=Window]
interface PerformanceTiming {
readonly attribute unsigned long long navigationStart;
readonly attribute unsigned long long unloadEventStart;
@ -80,8 +108,11 @@ interface PerformanceTiming {
readonly attribute unsigned long long domComplete;
readonly attribute unsigned long long loadEventStart;
readonly attribute unsigned long long loadEventEnd;
[Default] object toJSON();
};
[Exposed=Window]
interface PerformanceNavigation {
const unsigned short TYPE_NAVIGATE = 0;
const unsigned short TYPE_RELOAD = 1;
@ -89,16 +120,17 @@ interface PerformanceNavigation {
const unsigned short TYPE_RESERVED = 255;
readonly attribute unsigned short type;
readonly attribute unsigned short redirectCount;
[Default] object toJSON();
};
interface Performance : EventTarget {
// [Exposed=Window]
partial interface Performance {
[SameObject]
readonly attribute PerformanceTiming timing;
[SameObject]
readonly attribute PerformanceNavigation navigation;
};
partial interface Window {
[Replaceable] readonly attribute Performance performance;
};
</pre>
<script>
@ -108,10 +140,9 @@ partial interface Window {
idl_array.add_untested_idls(document.getElementById("untested_idl").textContent);
idl_array.add_idls(document.getElementById("idl").textContent);
idl_array.add_objects({Window: ["window"],
Performance: ["window.performance"],
PerformanceNavigation: ["window.performance.navigation"],
PerformanceTiming: ["window.performance.timing"]});
idl_array.add_objects({PerformanceNavigation: ["window.performance.navigation"],
PerformanceTiming: ["window.performance.timing"],
PerformanceNavigationTiming: ["window.performance.getEntriesByType('navigation')[0]"] });
idl_array.test();
})();