Update web-platform-tests to revision 8d1253647cfe3809ddf58a4ad7c9da5f26985d7e

This commit is contained in:
WPT Sync Bot 2020-11-13 08:20:12 +00:00
parent 553ff20468
commit 48c420fdb5
440 changed files with 6186 additions and 3542 deletions

View file

@ -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`);
}