Update web-platform-tests to revision 2abaf21d855986de7baa55ad52a601c489ff22fd

This commit is contained in:
WPT Sync Bot 2019-01-07 20:35:39 -05:00
parent e09e683718
commit 05d9213a6e
33 changed files with 531 additions and 95 deletions

View file

@ -186,22 +186,21 @@ function resource_load(expected)
const entries = window.performance.getEntriesByName(expected.name);
assert_equals(entries.length, 1, 'There should be a single matching entry');
const actual = entries[0];
// Debugging bug 1263428
// Feel free to remove/overwrite this piece of code
if (actual.connectStart < actual.domainLookupEnd) {
assert_true(false, "actual: "+JSON.stringify(actual));
if (window.location.protocol == "http:") {
assert_equals(actual.secureConnectionStart, 0, 'secureConnectionStart should be 0 in http');
} else {
assert_greater_than(actual.secureConnectionStart, 0, 'secureConnectionStart should not be 0 in https');
}
assert_equals(actual.redirectStart, 0, 'redirectStart should be 0');
assert_equals(actual.redirectEnd, 0, 'redirectEnd should be 0');
assert_true(actual.secureConnectionStart == undefined ||
actual.secureConnectionStart == 0, 'secureConnectionStart should be 0 or undefined');
assert_equals(actual.fetchStart, actual.startTime, 'fetchStart is equal to startTime');
assert_greater_than_equal(actual.domainLookupStart, actual.fetchStart, 'domainLookupStart after fetchStart');
assert_greater_than_equal(actual.domainLookupEnd, actual.domainLookupStart, 'domainLookupEnd after domainLookupStart');
assert_greater_than_equal(actual.connectStart, actual.domainLookupEnd, 'connectStart after domainLookupEnd');
assert_greater_than_equal(actual.connectEnd, actual.connectStart, 'connectEnd after connectStart');
assert_true(actual.secureConnectionStart == 0 || actual.secureConnectionStart <= actual.requestStart,
"secureConnectionStart should be either 0 or smaller than/equals to requestStart")
assert_greater_than_equal(actual.requestStart, actual.connectEnd, 'requestStart after connectEnd');
assert_greater_than_equal(actual.responseStart, actual.requestStart, 'responseStart after requestStart');
assert_greater_than_equal(actual.responseEnd, actual.responseStart, 'responseEnd after responseStart');