Update web-platform-tests to revision 70fdd27f4cecb8a5cae3dafa76ba05265531c9e2

This commit is contained in:
WPT Sync Bot 2019-11-10 10:27:24 +00:00
parent e5689df6b4
commit bea56037ef
701 changed files with 13864 additions and 1909 deletions

View file

@ -20,7 +20,7 @@ async_test(function(t) {
assert_equals(iframe.contentDocument.body.textContent, "src");
iframe.onload = t.step_func_done(function() {
assert_false(isAdded);
assert_true(isAdded);
assert_equals(iframe.contentDocument.location.href, "about:srcdoc");
assert_equals(iframe.contentDocument.body.textContent, "srcdoc");
});
@ -41,7 +41,7 @@ async_test(function(t) {
assert_equals(iframe.contentDocument.body.textContent, "old");
iframe.onload = t.step_func_done(function() {
assert_false(isChanged);
assert_true(isChanged);
assert_equals(iframe.contentDocument.location.href, "about:srcdoc");
assert_equals(iframe.contentDocument.body.textContent, "new");
});
@ -51,7 +51,7 @@ async_test(function(t) {
});
document.body.appendChild(iframe);
}, "Changing `srcdoc` (via property) triggers attributes processing");
}, "Setting `srcdoc` (via property) triggers attributes processing");
async_test(function(t) {
var iframe = createIFrameWithBlobSrc();
@ -62,7 +62,7 @@ async_test(function(t) {
assert_equals(iframe.contentDocument.body.textContent, "srcdoc");
iframe.onload = t.step_func_done(function() {
assert_false(isRemoved);
assert_true(isRemoved);
assert_equals(iframe.contentDocument.location.protocol, "blob:");
assert_equals(iframe.contentDocument.body.textContent, "src");
});

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/interaction/focus/the-autofocus-attribute/resources/utils.js"></script>
<body>
<dialog>
<input>
<input autofocus>
</dialog>
<script>
// https://github.com/whatwg/html/issues/4788
promise_test(async () => {
const dialog = document.querySelector('dialog');
dialog.show();
assert_equals(document.activeElement, dialog.querySelector('[autofocus]'),
'dialog.show() should set focus on a descendant element with an ' +
'autofocus attribute.');
document.activeElement.blur();
await waitUntilStableAutofocusState();
assert_equals(document.activeElement, document.body,
'Non-dialog autofocus processing should be skipped.');
}, 'An autofocus element in a dialog element should not try to get focus twice.');
</script>
</body>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/interaction/focus/the-autofocus-attribute/resources/utils.js"></script>
<body>
<dialog></dialog>
<script>
// https://github.com/whatwg/html/issues/4788
promise_test(async () => {
const dialog = document.querySelector('dialog');
dialog.show();
dialog.close();
const input = document.createElement('input');
input.autofocus = true;
document.body.insertBefore(input, dialog);
await waitUntilStableAutofocusState();
assert_equals(document.activeElement, document.body,
'Non-dialog autofocus processing should be skipped.');
}, 'After showing a dialog, non-dialog autofocus processing won\'t work.');
</script>
</body>