OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <div id="description"></div> |
| 4 <div id="console"></div> |
| 5 |
| 6 <input id="input1"> |
| 7 <object id="plugin1" type="application/x-fake-plugin"></object> |
| 8 |
| 9 <script> |
| 10 description('Ensures that elements within a plugin placeholder can be keyboard f
ocused.'); |
| 11 |
| 12 // Close buttons are focusable, so we expect focus to move into and out of the p
laceholder. |
| 13 var input1 = document.getElementById("input1"); |
| 14 var plugin1 = document.getElementById("plugin1"); |
| 15 internals.forcePluginPlaceholder(plugin1, { closeable: true }); |
| 16 var shadowRoot1 = internals.youngestShadowRoot(plugin1); |
| 17 input1.focus(); |
| 18 shouldBe("document.activeElement", "input1"); |
| 19 shouldBeNull("shadowRoot1.activeElement"); |
| 20 eventSender.keyDown("\t"); |
| 21 shouldBe("document.activeElement", "plugin1"); |
| 22 shouldBeNonNull("shadowRoot1.activeElement"); |
| 23 eventSender.keyDown("\t", ["shiftKey"]); |
| 24 shouldBe("document.activeElement", "input1"); |
| 25 shouldBeNull("shadowRoot1.activeElement"); |
| 26 document.activeElement.blur(); |
| 27 </script> |
OLD | NEW |