Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / dom / HTMLDocument / set-focus-on-valid-element.html
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);
8
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();
15 }
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>