Update web-platform-tests to revision 14f4f8e2c8ec5868a7c50fe647555cd966ba08a3

This commit is contained in:
WPT Sync Bot 2020-08-11 08:21:40 +00:00
parent 3097eb7de9
commit 714a3cfe1e
101 changed files with 2305 additions and 206 deletions

View file

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body id="body">
<dialog>
This is a dialog
</dialog>
<input />
<script>
"use strict";
function testFocus(element, expectFocus) {
var focusedElement = null;
element.addEventListener('focus', function() { focusedElement = element; }, false);
element.focus();
var theElement = element;
assert_equals(focusedElement === theElement, expectFocus, element.id);
}
test(function() {
var dialog = document.querySelector('dialog');
dialog.showModal();
var input = document.querySelector('input');
testFocus(input, false);
dialog.remove();
testFocus(input, true);
}, "Test that removing dialog unblocks the document.");
</script>
</body>
</html>