OLD | NEW |
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> |
OLD | NEW |