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

Side by Side Diff: LayoutTests/inspector/elements/styles/add-new-rule-invalid-selector.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 InspectorTest.runTestSuite([ 9 InspectorTest.runTestSuite([
10 function init(next) 10 function init(next)
11 { 11 {
12 WebInspector.inspectorView.showPanel("elements"); 12 WebInspector.inspectorView.showPanel("elements");
13 InspectorTest.selectNodeAndWaitForStyles("inspected", next); 13 InspectorTest.selectNodeAndWaitForStyles("inspected", next);
14 }, 14 },
15 15
16 function keyframesRuleSelector(next) 16 function keyframesRuleSelector(next)
17 { 17 {
18 // Click "Add new rule". 18 InspectorTest.addNewRule("@-webkit-keyframes shake", callback);
19 document.getElementById("add-style-button-test-id").click();
20 var section = WebInspector.panels.elements.sidebarPanes.styles.secti ons[0][2];
21 section._selectorElement.textContent = "@-webkit-keyframes shake";
22 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent( "Enter"));
23 InspectorTest.runAfterPendingDispatches(callback);
24 19
25 function callback() 20 function callback()
26 { 21 {
27 InspectorTest.dumpSelectedElementStyles(true, false, true); 22 InspectorTest.dumpSelectedElementStyles(true, false, true);
28 next(); 23 next();
29 } 24 }
30 } 25 }
31 ]); 26 ]);
32 } 27 }
33 28
34 </script> 29 </script>
35 </head> 30 </head>
36 31
37 <body onload="runTest()"> 32 <body onload="runTest()">
38 <p> 33 <p>
39 Tests that adding a new rule with invalid selector works as expected. 34 Tests that adding a new rule with invalid selector works as expected.
40 </p> 35 </p>
41 36
42 <div id="inspected">Text</div> 37 <div id="inspected">Text</div>
43 38
44 </body> 39 </body>
45 </html> 40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698