Update web-platform-tests to revision b'ee6da9d71d0268d7fdb04e8e5b26858f46ee0cc4'

This commit is contained in:
WPT Sync Bot 2022-01-20 04:38:55 +00:00 committed by cybai
parent 4401622eb1
commit b77ad115f6
16832 changed files with 270819 additions and 87621 deletions

View file

@ -0,0 +1,4 @@
<!doctype html>
<script>
window.callDocumentMethod = methodName => document[methodName]();
</script>

View file

@ -0,0 +1,13 @@
for (const methodName of ["open", "write", "writeln"]) {
async_test(t => {
const frame = document.body.appendChild(document.createElement("iframe"));
t.add_cleanup(() => { frame.remove(); });
const frameURL = new URL("resources/url-entry-document-incumbent-frame.html", document.URL).href;
frame.onload = t.step_func_done(() => {
assert_equals(frame.contentDocument.URL, frameURL);
frame.contentWindow.callDocumentMethod(methodName);
assert_equals(frame.contentDocument.URL, document.URL);
});
frame.src = frameURL;
}, `document.${methodName}() changes document's URL to the entry global object's associate document's (sync call)`);
}