Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / styles / undo-add-rule-crash.html
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 test()
8 {
9     InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
10
11     function step1()
12     {
13         addNewRuleAndSelectNode("other", step2);
14     }
15
16     function step2()
17     {
18         WebInspector.domAgent.undo();
19         InspectorTest.waitForStyles("other", step3);
20     }
21
22     function step3()
23     {
24         InspectorTest.completeTest();
25     }
26
27     function addNewRuleAndSelectNode(nodeId, next)
28     {
29         document.getElementById("add-style-button-test-id").click();
30         var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2];
31         InspectorTest.selectNodeAndWaitForStyles(nodeId, next);
32     }
33 }
34
35 </script>
36 </head>
37
38 <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>
40
41 <p>The test has passed (no crash).</p>
42 <div id="inspected"><div id="other" /></div>
43 <style>
44 @-webkit-keyframes cfpulse1 { 0% { opacity: 0.1;  } }
45 .c1 { -webkit-animation-name: cfpulse1;  }
46 </style>
47 </html>