Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / elements / styles / cached-sync-computed-styles.html
index 1795396..018b0a8 100644 (file)
@@ -16,15 +16,13 @@ function updateStyle()
 
 function test()
 {
-    WebInspector.showPanel("elements");
     InspectorTest.nodeWithId("inspected", step1);
     var backendCallCount = 0;
     var nodeId;
 
-    setTimeout(InspectorTest.completeTest.bind(InspectorTest), 3000);
-    function onBackendCall(method)
+    function onBackendCall(domain, method, params)
     {
-        if (method === "CSS.getComputedStyleForNode")
+        if (method === "CSS.getComputedStyleForNode" && params.nodeId === nodeId)
             ++backendCallCount;
     }
 
@@ -32,7 +30,7 @@ function test()
     {
         var callsLeft = 2;
         nodeId = node.id;
-        InspectorTest.addSniffer(InspectorBackendClass.prototype, "_wrapCallbackAndSendMessageObject", onBackendCall, true);
+        InspectorTest.addSniffer(InspectorBackend.connection(), "_wrapCallbackAndSendMessageObject", onBackendCall, true);
         WebInspector.cssModel.getComputedStyleAsync(nodeId, styleCallback);
         WebInspector.cssModel.getComputedStyleAsync(nodeId, styleCallback);
         function styleCallback()