| Index: third_party/WebKit/LayoutTests/inspector/elements/elements-panel-restore-selection-when-node-comes-later.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/elements/elements-panel-restore-selection-when-node-comes-later.html b/third_party/WebKit/LayoutTests/inspector/elements/elements-panel-restore-selection-when-node-comes-later.html
|
| deleted file mode 100644
|
| index 80da624612bd44b3547ad3c5579f92cb10223991..0000000000000000000000000000000000000000
|
| --- a/third_party/WebKit/LayoutTests/inspector/elements/elements-panel-restore-selection-when-node-comes-later.html
|
| +++ /dev/null
|
| @@ -1,97 +0,0 @@
|
| -<html>
|
| -<head>
|
| -<script src="../../http/tests/inspector/inspector-test.js"></script>
|
| -<script src="../../http/tests/inspector/elements-test.js"></script>
|
| -<script src="./shadow/elements-panel-shadow-selection-on-refresh.js"></script>
|
| -<script>
|
| -
|
| -function test()
|
| -{
|
| - var domModel = WebInspector.DOMModel.fromTarget(WebInspector.targetManager.mainTarget());
|
| - var node;
|
| -
|
| - InspectorTest.runTestSuite([
|
| - function selectNode(next)
|
| - {
|
| - InspectorTest.nodeWithId("inspected", onNodeFound);
|
| -
|
| - function onNodeFound(n)
|
| - {
|
| - node = n;
|
| - InspectorTest.selectNode(node).then(onNodeSelected);
|
| - }
|
| -
|
| - function onNodeSelected()
|
| - {
|
| - dumpSelectedNode();
|
| - next();
|
| - }
|
| - },
|
| -
|
| - function firstReloadWithoutNodeInDOM(next)
|
| - {
|
| - InspectorTest.addSniffer(WebInspector.ElementsPanel.prototype, "_lastSelectedNodeSelectedForTest", onNodeRestored);
|
| - // Do a reload and pretend page's DOM doesn't have a node to restore.
|
| - overridePushNodeForPath(node.path());
|
| - InspectorTest.reloadPage(function() { });
|
| -
|
| - function onNodeRestored()
|
| - {
|
| - dumpSelectedNode();
|
| - next();
|
| - }
|
| - },
|
| -
|
| - function secondReloadWithNodeInDOM(next)
|
| - {
|
| - InspectorTest.addSniffer(WebInspector.ElementsPanel.prototype, "_lastSelectedNodeSelectedForTest", onNodeRestored);
|
| -
|
| - InspectorTest.reloadPage(function() { });
|
| -
|
| - function onNodeRestored()
|
| - {
|
| - dumpSelectedNode();
|
| - next();
|
| - }
|
| - },
|
| -
|
| - ]);
|
| -
|
| - function dumpSelectedNode()
|
| - {
|
| - var selectedElement = InspectorTest.firstElementsTreeOutline().selectedTreeElement;
|
| - var nodeName = selectedElement ? selectedElement.node().nodeNameInCorrectCase() : "null";
|
| - InspectorTest.addResult("Selected node: '" + nodeName + "'");
|
| - }
|
| -
|
| - /**
|
| - * @param {string} pathToIgnore
|
| - */
|
| - function overridePushNodeForPath(pathToIgnore)
|
| - {
|
| - var original = InspectorTest.override(WebInspector.DOMModel.prototype, "pushNodeByPathToFrontend", override);
|
| -
|
| - function override(nodePath, callback)
|
| - {
|
| - if (nodePath === pathToIgnore) {
|
| - setTimeout(callback.bind(null), 0);
|
| - return;
|
| - }
|
| - original(nodePath, callback);
|
| - }
|
| - }
|
| -}
|
| -
|
| -</script>
|
| -</head>
|
| -
|
| -<body onload="runTest()">
|
| -<p>
|
| -Verify that last selected element is restored properly later, even if
|
| -it failed to do so once.
|
| -</p>
|
| -<div>
|
| - <span id="inspected"></span>
|
| -</div>
|
| -</body>
|
| -</html>
|
|
|