Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / elements / styles / styles-cancel-editing.html
index abd9849..8bcf3f1 100644 (file)
@@ -6,7 +6,6 @@
 
 function test()
 {
-    WebInspector.inspectorView.showPanel("elements");
     InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
 
     var treeElement;
@@ -27,28 +26,22 @@ function test()
 
         // Cancel editing.
         treeElement.valueElement.firstChild.select();
-        InspectorTest.addSniffer(WebInspector.StylePropertyTreeElement.prototype, "styleTextAppliedForTest", onStyleApplied);
+        InspectorTest.waitForStyleApplied(onStyleApplied);
 
         function onStyleApplied()
         {
             treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("U+001B")); // Escape
-            InspectorTest.runAfterPendingDispatches(step2);
+            InspectorTest.selectNodeWithId("other", step2);
         }
     }
 
     function step2()
     {
-        InspectorTest.selectNodeWithId("other");
-        InspectorTest.runAfterPendingDispatches(step3);
+        InspectorTest.selectNodeAndWaitForStyles("inspected", step3);
     }
 
     function step3()
     {
-        InspectorTest.selectNodeAndWaitForStyles("inspected", step4);
-    }
-
-    function step4()
-    {
         InspectorTest.addResult("After append:");
         InspectorTest.dumpSelectedElementStyles(true);
         InspectorTest.completeTest();