mirror of
https://github.com/servo/servo.git
synced 2025-09-17 10:28:22 +01:00
Update web-platform-tests to revision e426a6933a05bf144eba06a1d4c47ba876a4e2d1
This commit is contained in:
parent
415b26e4f1
commit
5e5eccabf8
495 changed files with 14920 additions and 784 deletions
BIN
tests/wpt/web-platform-tests/resize-observer/resources/image.png
Normal file
BIN
tests/wpt/web-platform-tests/resize-observer/resources/image.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 170 B |
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue