Update web-platform-tests to revision 3bbb55915a04548e70c63b7c143a83e0e9d3c5e7

This commit is contained in:
WPT Sync Bot 2019-04-01 22:33:23 -04:00
parent 3340214a29
commit b55cc798b6
100 changed files with 2036 additions and 3665 deletions

View file

@ -1,10 +1,11 @@
// Checks that this is an ElementTiming entry with name |expectedName|. It also
// does a very basic check on |startTime|: after |beforeRender| and before now().
function checkElement(entry, expectedName, expectedIdentifier, beforeRender) {
function checkElement(entry, expectedName, expectedIdentifier, expectedID, beforeRender) {
assert_equals(entry.entryType, 'element');
assert_equals(entry.name, expectedName);
assert_equals(entry.identifier, expectedIdentifier);
assert_equals(entry.duration, 0);
assert_equals(entry.id, expectedID);
assert_greater_than_equal(entry.startTime, beforeRender);
assert_greater_than_equal(performance.now(), entry.startTime);
const rt_entries = performance.getEntriesByName(expectedName, 'resource');
@ -12,7 +13,7 @@ function checkElement(entry, expectedName, expectedIdentifier, beforeRender) {
assert_equals(rt_entries[0].responseEnd, entry.responseEnd);
}
// Checks that the rect matches the desired values [left right top bottom]
// Checks that the rect matches the desired values [left right top bottom].
function checkRect(entry, expected, description="") {
assert_equals(entry.intersectionRect.left, expected[0],
'left of rect ' + description);
@ -23,3 +24,9 @@ function checkRect(entry, expected, description="") {
assert_equals(entry.intersectionRect.bottom, expected[3],
'bottom of rect ' + description);
}
// Checks that the intrinsic size matches the desired values.
function checkNaturalSize(entry, width, height) {
assert_equals(entry.naturalWidth, width);
assert_equals(entry.naturalHeight, height);
}