Index: LayoutTests/inspector-protocol/dom/dom-focus.html |
diff --git a/LayoutTests/inspector-protocol/dom/dom-focus.html b/LayoutTests/inspector-protocol/dom/dom-focus.html |
index 834272c9a6231a08dc0783309701d48933477971..571d7835d165c83218590c3398a37d0981cc7ba9 100644 |
--- a/LayoutTests/inspector-protocol/dom/dom-focus.html |
+++ b/LayoutTests/inspector-protocol/dom/dom-focus.html |
@@ -3,16 +3,15 @@ |
<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/protocol-test.js"></script> |
<script> |
-window.addEventListener("load", function() { |
- document.querySelector("#second").addEventListener("focus", onFocus); |
- |
- function onFocus() { |
- log("focused"); |
- } |
-}); |
+function logActiveElement() { |
+ var el = document.activeElement; |
+ log(el ? (el.id || el.tagName) : "(none)"); |
+} |
function test() |
{ |
+ InspectorTest.sendCommand("Runtime.evaluate", { "expression": "logActiveElement()" }); |
+ |
InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument); |
function onGotDocument(msg) { |
@@ -38,6 +37,8 @@ function test() |
function onFocus(msg) { |
if (msg.error) |
InspectorTest.log(msg.error); |
+ |
+ InspectorTest.sendCommand("Runtime.evaluate", { expression: 'logActiveElement()' }); |
InspectorTest.completeTest(); |
} |
} |