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

Side by Side Diff: LayoutTests/inspector/elements/styles/commit-selector-mark-matching.html

Issue 441873010: DevTools: [SSP] Implement adding new rule in user stylesheet (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix compilation error Created 6 years, 4 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script> 4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 WebInspector.inspectorView.showPanel("elements"); 9 WebInspector.inspectorView.showPanel("elements");
10 var nodeId; 10 var nodeId;
11 var stylesPane; 11 var stylesPane;
12 12
13 InspectorTest.runTestSuite([ 13 InspectorTest.runTestSuite([
14 function setUp(next) { 14 function setUp(next) {
15 InspectorTest.selectNodeAndWaitForStyles("inspected", next); 15 InspectorTest.selectNodeAndWaitForStyles("inspected", next);
16 }, 16 },
17 17
18 function addRule(next) 18 function addRule(next)
19 { 19 {
20 InspectorTest.nodeWithId("inspected", nodeCallback); 20 InspectorTest.nodeWithId("inspected", nodeCallback);
21 21
22 function nodeCallback(node) 22 function nodeCallback(node)
23 { 23 {
24 nodeId = node.id; 24 nodeId = node.id;
25 stylesPane = WebInspector.panels.elements.sidebarPanes.styles; 25 stylesPane = WebInspector.panels.elements.sidebarPanes.styles;
26 stylesPane.addBlankSection(); 26 InspectorTest.addNewRule("foo, #inspected, .bar, #inspected", ca llback);
27 var section = stylesPane.sections[0][2];
28 section.startEditingSelector();
29 section._selectorElement.textContent = "foo, #inspected, .bar, # inspected";
30 section._selectorElement.dispatchEvent(InspectorTest.createKeyEv ent("Enter"));
31 InspectorTest.runAfterPendingDispatches(callback);
32 } 27 }
33 28
34 function callback() 29 function callback()
35 { 30 {
36 InspectorTest.dumpSelectedElementStyles(true, false, false, true ); 31 InspectorTest.dumpSelectedElementStyles(true, false, false, true );
37 next(); 32 next();
38 } 33 }
39 }, 34 },
40 35
41 function changeSelector(next) 36 function changeSelector(next)
(...skipping 19 matching lines...) Expand all
61 56
62 <body onload="runTest()"> 57 <body onload="runTest()">
63 <p> 58 <p>
64 Tests that matching selectors are marked properly after new rule creation and se lector change. 59 Tests that matching selectors are marked properly after new rule creation and se lector change.
65 </p> 60 </p>
66 61
67 <div id="inspected"></div> 62 <div id="inspected"></div>
68 63
69 </body> 64 </body>
70 </html> 65 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698