mirror of
https://github.com/servo/servo.git
synced 2025-08-19 12:25:33 +01:00
Update web-platform-tests to revision ddfc95cf0493ae147a4f6a4d7be8eff1a0c23098
This commit is contained in:
parent
1f6a864ab5
commit
7e6290451f
832 changed files with 16026 additions and 2649 deletions
|
@ -11,12 +11,12 @@
|
|||
<script src="resources/webperftestharnessextension.js"></script>
|
||||
<script>
|
||||
setup({explicit_done: true});
|
||||
var iframe;
|
||||
var d;
|
||||
var body;
|
||||
let iframe;
|
||||
let d;
|
||||
let body;
|
||||
|
||||
// explicitly test the namespace before we start testing
|
||||
test_namespace("getEntriesByType");
|
||||
// Explicitly test the namespace before we start testing.
|
||||
test_namespace('getEntriesByType');
|
||||
|
||||
function setup_iframe() {
|
||||
iframe = document.getElementById('frameContext');
|
||||
|
@ -30,17 +30,17 @@ function onload_test() {
|
|||
done();
|
||||
return;
|
||||
}
|
||||
var context = new PerformanceContext(iframe.contentWindow.performance);
|
||||
var entries = context.getEntriesByType('resource');
|
||||
const context = new PerformanceContext(iframe.contentWindow.performance);
|
||||
const entries = context.getEntriesByType('resource');
|
||||
|
||||
// when a persistent connection is used, follow-on resources should be included as PerformanceResourceTiming objects
|
||||
// When a persistent connection is used, follow-on resources should be included as PerformanceResourceTiming objects.
|
||||
test_equals(entries.length, 2, 'There should be 2 PerformanceEntries');
|
||||
|
||||
if (entries.length >= 2) {
|
||||
// when a persistent connection is used, for the resource that reuses the socket, connectStart and connectEnd should have the same value as fetchStart
|
||||
var entry = entries[1];
|
||||
test_equals(entry.fetchStart, entry.connectStart, "connectStart and fetchStart should be the same");
|
||||
test_equals(entry.fetchStart, entry.connectEnd, "connectEnd and fetchStart should be the same");
|
||||
// When a persistent connection is used, for the resource that reuses the socket, connectStart and connectEnd should have the same value as fetchStart.
|
||||
const entry = entries[1];
|
||||
test_equals(entry.fetchStart, entry.connectStart, 'connectStart and fetchStart should be the same');
|
||||
test_equals(entry.fetchStart, entry.connectEnd, 'connectEnd and fetchStart should be the same');
|
||||
}
|
||||
|
||||
done();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue