| <html> |
| <head> |
| <script type="text/javascript" src="../../http/tests/inspector/resources/protocol-test.js"></script> |
| <style> |
| #flow { |
| -webkit-flow-into: flow; |
| } |
| </style> |
| <script> |
| function test() |
| { |
| InspectorProtocol.sendCommand("DOM.getDocument", {}, onGotDocument); |
| |
| function onGotDocument(msg) { |
| InspectorProtocol.checkForError(msg); |
| var node = msg.result.root; |
| InspectorProtocol.sendCommand("DOM.querySelector", { "nodeId": node.nodeId, "selector": "#inspectedElement" }, onQuerySelector); |
| } |
| |
| function onQuerySelector(msg) { |
| InspectorProtocol.checkForError(msg); |
| var node = msg.result; |
| var highlightConfig = { |
| showInfo: true, |
| contentColor: {r: 255, g: 255, b: 255}, |
| paddingColor: {r: 255, g: 255, b: 255}, |
| borderColor: {r: 255, g: 255, b: 255}, |
| marginColor: {r: 255, g: 255, b: 255}, |
| }; |
| InspectorProtocol.sendCommand("DOM.highlightNode", { "highlightConfig": highlightConfig, "nodeId": node.nodeId }, onHighlightComplete); |
| } |
| |
| function onHighlightComplete(msg) { |
| InspectorProtocol.checkForError(msg); |
| ProtocolTest.completeTest(); |
| } |
| } |
| </script> |
| </head> |
| <body onload="runTest()"> |
| |
| <div id="flow"> |
| <div id="inspectedElement"></div> |
| </div> |
| |
| <p>Testing that the backend is not crashing when highlighting a node that has no associated region.</p> |
| |
| </body> |
| </html> |