| <html> |
| <head> |
| <script src="../../http/tests/inspector/inspector-test.js"></script> |
| <script src="../../http/tests/inspector/elements-test.js"></script> |
| <script> |
| |
| function test() |
| { |
| InspectorTest.selectNodeWithId("test-topic", step1); |
| |
| function step1() |
| { |
| InspectorTest.reloadPage(step2); |
| } |
| |
| function step2() |
| { |
| InspectorTest.runAfterPendingDispatches(step3); |
| } |
| |
| function step3() |
| { |
| // We should have "test-topic" element selected after refresh. |
| var selectedElement = WebInspector.panels.elements.treeOutline.selectedTreeElement; |
| var nodeName = selectedElement ? selectedElement.representedObject.nodeName() : "null"; |
| InspectorTest.addResult("Selected element should be 'P', was: '" + nodeName + "'"); |
| InspectorTest.completeTest(); |
| } |
| } |
| |
| </script> |
| </head> |
| |
| <body onload="runTest()"> |
| <p id="test-topic"> |
| Tests that elements panel preserves selected node on page refresh. |
| </p> |
| |
| </body> |
| </html> |