Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLDocument / set-focus-on-valid-element.html
blobb895396c9de772976c4c3ae6873841ce14a05360
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <script>
4 document.addEventListener("DOMFocusOut", function() {
5 holder.removeChild(willBeRemoved);
6 willBeDisabled.disabled = true;
7 }, false);
9 function test() {
10 description("document.activeElement should return a valid and focusable element.");
11 shouldNotBe("document.activeElement", "willBeDisabled");
12 shouldBeEqualToString("document.activeElement.id", "body");
13 holder.removeChild(willBeDisabled);
14 isSuccessfullyParsed();
16 </script>
17 <body id=body onload="test()">
18 <div id=holder>
19 <input autofocus id=willBeRemoved>
20 <input autofocus id=willBeDisabled>
21 </div>
22 </body>