2010-12-17 Andrey Kosyakov <caseq@chromium.org>
authorcaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Dec 2010 09:13:27 +0000 (09:13 +0000)
committercaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Dec 2010 09:13:27 +0000 (09:13 +0000)
        Unreviewed. Clean up extra headers set in test to avoid side effects on other tests.

        * http/tests/inspector/extensions-headers-expected.txt:
        * http/tests/inspector/extensions-headers.html:

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

LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/extensions-headers-expected.txt
LayoutTests/http/tests/inspector/extensions-headers.html

index a50943d..44ffc51 100644 (file)
@@ -1,3 +1,10 @@
+2010-12-17  Andrey Kosyakov  <caseq@chromium.org>
+
+        Unreviewed. Clean up extra headers set in test to avoid side effects on other tests.
+
+        * http/tests/inspector/extensions-headers-expected.txt:
+        * http/tests/inspector/extensions-headers.html:
+
 2010-12-17  Eric Seidel  <eric@webkit.org>
 
         Unreviewed, rolling out r74229.
index 3e67a16..97b09a0 100644 (file)
@@ -2,6 +2,8 @@ Tests WebInspector extension API
 
 HTTP_X_WEBINSPECTOR_EXTENSION: test
 HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)
+HTTP_X_WEBINSPECTOR_EXTENSION: 
+HTTP_USER_AGENT: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533+ (KHTML, like Gecko)
 Started extension.
 Running tests...
 RUNNING TEST: extension_testAddHeaders
index 8f106fd..2ab4fbc 100644 (file)
@@ -10,7 +10,15 @@ function extension_testAddHeaders(nextTest)
         "x-webinspector-extension": "test",
         "user-agent": "Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)"
     });
-    webInspector.inspectedWindow.eval("doXHR()", nextTest);
+    function cleanUpHeaders()
+    {
+        webInspector.resources.addRequestHeaders({
+            "x-webinspector-extension": null,
+            "user-agent": null
+        });
+        webInspector.inspectedWindow.eval("doXHR()", nextTest);
+    }
+    webInspector.inspectedWindow.eval("doXHR()", cleanUpHeaders);
 }
 
 function doXHR()
@@ -21,7 +29,7 @@ function doXHR()
     // Can't use output() here due to output order instability: this is invoked by inspectedWindow.eval(),
     // which is not serialized against output from extension, as the latter is posted asynchronously via
     // postMessage to front-end window.
-    document.getElementById("headers").textContent = xhr.responseText;
+    document.getElementById("headers").textContent += xhr.responseText;
 }
 
 </script>