Reviewed by Mitz.
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Sep 2007 21:12:06 +0000 (21:12 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Sep 2007 21:12:06 +0000 (21:12 +0000)
        Re-enable and the npapi-response-headers.html test so it no longer
        relies on the ordering of the requests being made.

        * http/tests/plugins/npapi-response-headers-expected.txt:
        * http/tests/plugins/npapi-response-headers.html: Copied from http/tests/plugins/npapi-response-headers.html.disabled.
        * http/tests/plugins/npapi-response-headers.html.disabled: Removed.

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

LayoutTests/ChangeLog
LayoutTests/http/tests/plugins/npapi-response-headers-expected.txt
LayoutTests/http/tests/plugins/npapi-response-headers.html [moved from LayoutTests/http/tests/plugins/npapi-response-headers.html.disabled with 90% similarity]

index 8eaa427578d930f762ee6ad170b9718a9a4525b9..744cc2570caf33ba62748af9afa8c15753e70533 100644 (file)
@@ -1,3 +1,14 @@
+2007-09-06  Anders Carlsson  <andersca@apple.com>
+
+        Reviewed by Mitz.
+
+        Re-enable and the npapi-response-headers.html test so it no longer
+        relies on the ordering of the requests being made.        
+        
+        * http/tests/plugins/npapi-response-headers-expected.txt:
+        * http/tests/plugins/npapi-response-headers.html: Copied from http/tests/plugins/npapi-response-headers.html.disabled.
+        * http/tests/plugins/npapi-response-headers.html.disabled: Removed.
+
 2007-09-05  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Sam and Darin
index 1f5759d272c575b528cc7a41afcfe3d30a687808..3a7a2327033839d4d8b9103573a736df21bc9c57 100644 (file)
@@ -14,5 +14,3 @@ Content-Type: text/plain
 http://[varies, not being tested]/plugins/resources/load-me-2.txt
 HTTP 200 OK
 Content-Type: text/plain
-
-
similarity index 90%
rename from LayoutTests/http/tests/plugins/npapi-response-headers.html.disabled
rename to LayoutTests/http/tests/plugins/npapi-response-headers.html
index 67e9b5f005ff9d22ed9e2fee51d082f75ff8ce81..12a509f333762335adc336b820a615896f46aec9 100644 (file)
@@ -6,6 +6,8 @@ if (window.layoutTestController) {
     layoutTestController.waitUntilDone();
 }
 
+loadedFirstURL = false;
+
 var res1, res2;
 
 function test()
@@ -13,7 +15,6 @@ function test()
     try {
         res1 = document.getElementById("result1");
         res2 = document.getElementById("result2");
-        plg.getURLNotify("/plugins/resources/load-me-2.txt", null, "callback");
     } catch (ex) {
         showErr("Exception: " + ex.description);
         if (window.layoutTestController)
@@ -21,6 +22,15 @@ function test()
     }
 }
 
+function streamLoaded()
+{
+    if (loadedFirstURL)
+        return;
+        
+    loadedFirstURL = true;
+    plg.getURLNotify("/plugins/resources/load-me-2.txt", null, "callback");
+}
+
 function callback(errCode, streamDump)
 {
     var parse = parseStreamDump(streamDump);
@@ -84,7 +94,7 @@ function parseHeaders(hdrs)
 </script>
 </head>
 <body onload="test()">
-<embed name="plg" type="application/x-webkit-test-netscape" src="/plugins/resources/load-me-1.txt"></embed>
+<embed name="plg" type="application/x-webkit-test-netscape" src="/plugins/resources/load-me-1.txt" onstreamload="streamLoaded()"></embed>
 <p>Test for <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=13029">bug 13029<a/>:
 Permit NPAPI plug-ins to see HTTP response headers.</p>
 <p>Expected result below is two HTTP response extracts, one for the initial stream specified in the "src"