Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / elements / edit / switch-panels-while-editing-as-html.html
blob7b4fc514073dfabb515442ba7b0ce722b91e6c4a
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script src="edit-dom-test.js"></script>
6 <script>
8 function test()
10 InspectorTest.runTestSuite([
11 function testSetUp(next)
13 InspectorTest.expandElementsTree(next);
16 function selectNode(next)
18 InspectorTest.selectNodeWithId("inspected", onNodeSelected)
20 function onNodeSelected(node)
22 var treeOutline = InspectorTest.firstElementsTreeOutline();
23 var treeElement = treeOutline.findTreeElement(node);
24 treeElement.toggleEditAsHTML();
25 InspectorTest.addSniffer(WebInspector.ElementsTreeOutline.prototype, "setMultilineEditing", next);
29 function switchPanels(next)
31 WebInspector.inspectorView.showPanel("sources")
32 .then(next)
33 .catch(onError);
35 function onError(error)
37 InspectorTest.addResult("FAILURE: exception caught while switching panels.");
38 InspectorTest.completeTest();
41 ]);
44 </script>
45 </head>
47 <body onload="runTest()">
48 <p>
49 Verifies inspector doesn't break when switching panels while editing as HTML. crbug.com/485457
50 </p>
52 <div>
53 <div id="inspected">Inspected Node</div>
54 </div>
55 </body>
56 </html>