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

Side by Side Diff: LayoutTests/inspector/elements/styles/undo-add-rule-crash.html

Issue 177963004: DevTools: Split creating inspector stylesheet and adding a new rule into stylesheet in protocol. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comments addressed Created 6 years, 9 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.selectNodeAndWaitForStyles("inspected", step1); 9 InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
10 10
11 function step1() 11 function step1()
12 { 12 {
13 addNewRuleAndSelectNode("other", step2); 13 addNewRuleAndSelectNode("other", step2);
14 } 14 }
15 15
16 function step2() 16 function step2()
17 { 17 {
18 WebInspector.domAgent.undo(); 18 WebInspector.domAgent.undo();
19 InspectorTest.waitForStyles("other", step3); 19 InspectorTest.waitForStyles("other", step3);
20 } 20 }
21 21
22 function step3() 22 function step3()
23 { 23 {
24 InspectorTest.completeTest(); 24 InspectorTest.completeTest();
25 } 25 }
26 26
27 function addNewRuleAndSelectNode(nodeId, next) 27 function addNewRuleAndSelectNode(nodeId, next)
28 { 28 {
29 document.getElementById("add-style-button-test-id").click(); 29 InspectorTest.addNewRule(null, ruleAdded);
30 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[ 0][2]; 30
31 InspectorTest.selectNodeAndWaitForStyles(nodeId, next); 31 function ruleAdded()
32 {
33 InspectorTest.selectNodeAndWaitForStyles(nodeId, next);
34 }
32 } 35 }
33 } 36 }
34 37
35 </script> 38 </script>
36 </head> 39 </head>
37 40
38 <body onload="runTest()"> 41 <body onload="runTest()">
39 Tests that the inspected page does not crash after undoing a new rule addition. <a href="https://bugs.webkit.org/show_bug.cgi?id=104806">Bug 104806</a> 42 Tests that the inspected page does not crash after undoing a new rule addition. <a href="https://bugs.webkit.org/show_bug.cgi?id=104806">Bug 104806</a>
40 43
41 <p>The test has passed (no crash).</p> 44 <p>The test has passed (no crash).</p>
42 <div id="inspected"><div id="other" /></div> 45 <div id="inspected"><div id="other" /></div>
43 <style> 46 <style>
44 @-webkit-keyframes cfpulse1 { 0% { opacity: 0.1; } } 47 @-webkit-keyframes cfpulse1 { 0% { opacity: 0.1; } }
45 .c1 { -webkit-animation-name: cfpulse1; } 48 .c1 { -webkit-animation-name: cfpulse1; }
46 </style> 49 </style>
47 </html> 50 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698