Bug 1474855 [wpt PR 11909] - Update the resource-timing IDL + test, a=testonly

Automatic update from web-platform-testsUpdate the resource-timing IDL + test (#11909)

--

wpt-commits: 53dbcecf1e4b5ff40f1d0ee67037e32a4249f9ce
wpt-pr: 11909
This commit is contained in:
Luke Bjerring 2018-07-25 18:34:33 +00:00 committed by James Graham
parent 4c82cf6218
commit 9fd0f25074
3 changed files with 39 additions and 42 deletions

View File

@ -592763,7 +592763,7 @@
"support"
],
"interfaces/resource-timing.idl": [
"75fcdf5c6ac811254e1a025cd58d958f27ab5b5b",
"d500e42e860b94614c0efeeb0b46d2ad7e8d79f9",
"support"
],
"interfaces/screen-orientation.idl": [
@ -612619,7 +612619,7 @@
"testharness"
],
"resource-timing/idlharness.any.js": [
"a1bb5ee0f67683b42035fa683e9a984b0cf4d5dc",
"2065b03393c21199e49553ec99902aaddec74ce0",
"testharness"
],
"resource-timing/iframe-setdomain.sub.html": [

View File

@ -5,27 +5,28 @@
[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;
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();
};
partial interface Performance {
void clearResourceTimings();
void setResourceTimingBufferSize(unsigned long maxSize);
attribute EventHandler onresourcetimingbufferfull;
void clearResourceTimings();
void setResourceTimingBufferSize(unsigned long maxSize);
attribute EventHandler onresourcetimingbufferfull;
};

View File

@ -5,24 +5,20 @@
// https://w3c.github.io/resource-timing/
promise_test(async () => {
const [idl, perf, hrtime, dom, html] = await Promise.all([
'/interfaces/resource-timing.idl',
'/interfaces/performance-timeline.idl',
'/interfaces/hr-time.idl',
'/interfaces/dom.idl',
'/interfaces/html.idl',
].map(url => fetch(url).then(r => r.text())));
idl_test(
['resource-timing'],
['performance-timeline', 'hr-time', 'dom', 'html'],
idl_array => {
try {
self.resource = performance.getEntriesByType('resource')[0];
} catch (e) {
// Will be surfaced when resource is undefined below.
}
const idl_array = new IdlArray();
idl_array.add_idls(idl);
idl_array.add_dependency_idls(perf);
idl_array.add_dependency_idls(hrtime);
idl_array.add_dependency_idls(dom);
idl_array.add_dependency_idls(html);
idl_array.add_objects({
Performance: ['performance'],
PerformanceResourceTiming: ["performance.getEntriesByType('resource')[0]"]
});
idl_array.test();
}, 'Test server-timing IDL implementation');
idl_array.add_objects({
Performance: ['performance'],
PerformanceResourceTiming: ['resource']
});
},
'Test server-timing IDL implementation'
);