Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: LayoutTests/inspector/elements/styles/page-reload-update-sidebar.html

Issue 1158883003: DevTools: shard inspector/elements tests for faster execution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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>
6
7 function removeInspectedNode()
8 {
9 document.querySelector("#inspected").remove();
10 }
11
12 function test()
13 {
14 var stylesSidebarPane = WebInspector.panels.elements.sidebarPanes.styles;
15 InspectorTest.runTestSuite([
16 function selectInspectedNode(next)
17 {
18 InspectorTest.selectNodeAndWaitForStyles("inspected", next);
19 },
20
21 function startEditingAndReloadPage(next)
22 {
23 var treeElement = InspectorTest.getElementStylePropertyTreeItem("col or");
24 var currentDocumentId = stylesSidebarPane.node().ownerDocument.id;
25 treeElement.startEditing(treeElement.valueElement);
26 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, " _nodeStylesUpdatedForTest", onNodeRebuilt);
27 InspectorTest.reloadPage();
28
29 function onNodeRebuilt(node, rebuild)
30 {
31 if (!node || node.ownerDocument.id === currentDocumentId) {
32 InspectorTest.addResult("ERROR: A rebuild update happened fo r the same node.");
33 InspectorTest.completeTest();
34 return;
35 }
36 next();
37 }
38 },
39
40 function onPageReloaded(next)
41 {
42 if (stylesSidebarPane._isEditingStyle) {
43 InspectorTest.addResult("StylesSidebarPane should not be locked in editing on page reload.");
44 InspectorTest.completeTest();
45 return;
46 }
47 next();
48 },
49 ]);
50 }
51
52 </script>
53 </head>
54
55 <body onload="runTest()">
56 <p>
57 Tests that reloading page during styles sidebar pane editing cancels editing and re-renders the
58 sidebar pane.
59 </p>
60 <div id="inspected" style="color: blue">Text</div>
61 </body>
62 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698