2011-03-18 Andrey Kosyakov <caseq@chromium.org>
authorcaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Mar 2011 09:36:53 +0000 (09:36 +0000)
committercaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Mar 2011 09:36:53 +0000 (09:36 +0000)
        Reviewed by Pavel Feldman.

        http/tests/inspector/resource-parameters.html is flakey
        https://bugs.webkit.org/show_bug.cgi?id=55867

        Fixed test flakiness by not finishing test before proper resource arrives.

        * http/tests/inspector/resource-parameters.html: Renamed from LayoutTests/http/tests/inspector/resource-parameters.html-disabled.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81461 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/resource-parameters.html [moved from LayoutTests/http/tests/inspector/resource-parameters.html-disabled with 60% similarity, mode: 0755]

index 369b821..34122d7 100644 (file)
@@ -1,3 +1,14 @@
+2011-03-18  Andrey Kosyakov  <caseq@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        http/tests/inspector/resource-parameters.html is flakey
+        https://bugs.webkit.org/show_bug.cgi?id=55867
+
+        Fixed test flakiness by not finishing test before proper resource arrives.
+
+        * http/tests/inspector/resource-parameters.html: Renamed from LayoutTests/http/tests/inspector/resource-parameters.html-disabled.
+
 2011-03-18  Ilya Tikhonovsky  <loislo@chromium.org>
 
         Reviewed by Yury Semikhatsky.
old mode 100644 (file)
new mode 100755 (executable)
similarity index 60%
rename from LayoutTests/http/tests/inspector/resource-parameters.html-disabled
rename to LayoutTests/http/tests/inspector/resource-parameters.html
index 9a6e0e6..3055273
@@ -12,13 +12,14 @@ function submit()
 function test()
 {
     InspectorTest.evaluateInPage("submit()");
-    InspectorTest.addSniffer(WebInspector.NetworkDispatcher.prototype, "didFinishLoading", dumpHAR);
+    WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.ResourceFinished, onResourceFinished);
 
-    function dumpHAR()
+    function onResourceFinished(event)
     {
-        var resource = WebInspector.resourceForURL("http://localhost:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2=");
-        if (resource)
-           InspectorTest.addObject(new WebInspector.HAREntry(resource).build(), InspectorTest.HARNondeterministicProperties);
+        var resource = event.data;
+        if (resource.url !== "http://localhost:8000/inspector/resources/post-target.cgi?queryParam1=queryValue1&queryParam2=")
+            return;
+        InspectorTest.addObject(new WebInspector.HAREntry(resource).build(), InspectorTest.HARNondeterministicProperties);
         InspectorTest.completeTest();
     }
 }