mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision 8d1253647cfe3809ddf58a4ad7c9da5f26985d7e
This commit is contained in:
parent
553ff20468
commit
48c420fdb5
440 changed files with 6186 additions and 3542 deletions
|
@ -227,3 +227,27 @@ function checkBeforeinputAndInputEventsOnNOOP() {
|
|||
"input event shouldn't be fired when the key operation does not cause modifying the DOM tree"
|
||||
);
|
||||
}
|
||||
|
||||
function checkEditorContentResultAsSubTest(
|
||||
expectedResult,
|
||||
description,
|
||||
options = {}
|
||||
) {
|
||||
test(() => {
|
||||
if (Array.isArray(expectedResult)) {
|
||||
assert_in_array(
|
||||
options.ignoreWhiteSpaceDifference
|
||||
? gEditor.innerHTML.replace(/ /g, " ")
|
||||
: gEditor.innerHTML,
|
||||
expectedResult
|
||||
);
|
||||
} else {
|
||||
assert_equals(
|
||||
options.ignoreWhiteSpaceDifference
|
||||
? gEditor.innerHTML.replace(/ /g, " ")
|
||||
: gEditor.innerHTML,
|
||||
expectedResult
|
||||
);
|
||||
}
|
||||
}, `${description} - comparing innerHTML`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue