Update web-platform-tests to revision 66c4613f823c4384c78ada77346eda17bb128947

This commit is contained in:
Ms2ger 2016-03-15 15:55:36 +01:00
parent 183772583f
commit a91433f0c8
234 changed files with 4368 additions and 967 deletions

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Selector: pseudo-classes (:focus for autofocus)</title>
<link rel="author" title="Kent Tamura" href="mailto:tkent@chromium.org">
<link rel=help href="https://html.spec.whatwg.org/multipage/#pseudo-classes">
<link rel=help href="https://html.spec.whatwg.org/multipage/forms.html#autofocusing-a-form-control:-the-autofocus-attribute">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
// This test can't be merged to focus.html because element.focus() may affect
// autofocus behavior.
var autofocusTest = async_test(":focus selector should work with an autofocused element.");
var input = document.createElement("input");
input.autofocus = true;
input.addEventListener("focus", function() {
autofocusTest.step(function() {
assert_array_equals(document.querySelectorAll(":focus"), [input])
autofocusTest.done();
});
}, false);
document.body.appendChild(input);
</script>
</body>

View file

@ -11,7 +11,6 @@
<button id=button1 type=submit>button1</button>
<input id=input1>
<input id=input2 disabled>
<input id=input3 autofocus>
<textarea id=textarea1>textarea1</textarea>
<input type=checkbox id=checkbox1 checked>
<input type=radio id=radio1 checked>
@ -20,8 +19,6 @@
<iframe src="focus-iframe.html" id=iframe onload="load()"></iframe>
<script>
testSelector(":focus", ["input3"], "input3 has the attribute autofocus");
document.getElementById("input1").focus(); // set the focus on input1
testSelector(":focus", ["input1"], "input1 has the focus");