Update web-platform-tests to revision e426a6933a05bf144eba06a1d4c47ba876a4e2d1

This commit is contained in:
WPT Sync Bot 2019-05-22 10:24:35 +00:00
parent 415b26e4f1
commit 5e5eccabf8
495 changed files with 14920 additions and 784 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

View file

@ -121,8 +121,13 @@ ResizeTestHelper.prototype = {
window.requestAnimationFrame(() => { this._resolvePromise(); });
},
start: function() {
start: function(cleanup) {
this._harnessTest = async_test(this._name);
if (cleanup) {
this._harnessTest.add_cleanup(cleanup);
}
this._harnessTest.step(() => {
assert_equals(this._stepIdx, -1, "start can only be called once");
this._nextStep();
@ -139,6 +144,13 @@ ResizeTestHelper.prototype = {
return this._rafCount;
},
get test() {
if (!this._harnessTest) {
throw "_harnessTest is not initialized";
}
return this._harnessTest;
},
_incrementRaf: function() {
if (this._rafCountRequest) {
this._rafCount++;
@ -155,3 +167,12 @@ ResizeTestHelper.prototype = {
this._rafCountRequest = window.requestAnimationFrame(this._incrementRafBind);
}
}
function createAndAppendElement(tagName, parent) {
if (!parent) {
parent = document.body;
}
const element = document.createElement(tagName);
parent.appendChild(element);
return element;
}