[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

joepeck at webkit.org joepeck at webkit.org
Wed Dec 22 12:15:29 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 8564f0a696164af80d24e0ef1bbecc3b132185b6
Author: joepeck at webkit.org <joepeck at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 17 22:36:15 2010 +0000

    2010-08-17  Joseph Pecoraro  <joepeck at webkit.org>
    
            Reviewed by Pavel Feldman.
    
            Web Inspector: Add XMLHttpRequest Logging Tests
            https://bugs.webkit.org/show_bug.cgi?id=44092
    
            * http/tests/inspector/console-xhr-logging-expected.txt: Added.
            * http/tests/inspector/console-xhr-logging.html: Added.
            * http/tests/inspector/resources/xhr-exists.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65565 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f810607..7a60a82 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-17  Joseph Pecoraro  <joepeck at webkit.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: Add XMLHttpRequest Logging Tests
+        https://bugs.webkit.org/show_bug.cgi?id=44092
+
+        * http/tests/inspector/console-xhr-logging-expected.txt: Added.
+        * http/tests/inspector/console-xhr-logging.html: Added.
+        * http/tests/inspector/resources/xhr-exists.html: Added.
+
 2010-08-17  Ojan Vafai  <ojan at chromium.org>
 
         Reviewed by Tony Chang.
diff --git a/LayoutTests/http/tests/inspector/console-xhr-logging-expected.txt b/LayoutTests/http/tests/inspector/console-xhr-logging-expected.txt
new file mode 100644
index 0000000..85cb331
--- /dev/null
+++ b/LayoutTests/http/tests/inspector/console-xhr-logging-expected.txt
@@ -0,0 +1,24 @@
+CONSOLE MESSAGE: line 11: enabled
+CONSOLE MESSAGE: line 40: sending a %s request to %s
+CONSOLE MESSAGE: line 40: sending a %s request to %s
+CONSOLE MESSAGE: line 40: sending a %s request to %s
+CONSOLE MESSAGE: line 21: disabled
+CONSOLE MESSAGE: line 40: sending a %s request to %s
+CONSOLE MESSAGE: line 40: sending a %s request to %s
+CONSOLE MESSAGE: line 40: sending a %s request to %s
+Tests that XMLHttpRequest Logging works when Enabled and doesn't show logs when Disabled.
+
+console-xhr-logging.html:11enabled
+console-xhr-logging.html:40sending a GET request to resources/xhr-exists.html
+XHR finished loading: "http://127.0.0.1:8000/inspector/resources/xhr-exists.html".
+console-xhr-logging.html:40sending a GET request to resources/xhr-does-not-exist.html
+resources/xhr-does-not-exist.htmlFailed to load resource: the server responded with a status of 404 (Not Found)
+XHR finished loading: "http://127.0.0.1:8000/inspector/resources/xhr-does-not-exist.html".
+console-xhr-logging.html:40sending a POST request to resources/xhr-exists.html
+XHR finished loading: "http://127.0.0.1:8000/inspector/resources/xhr-exists.html".
+console-xhr-logging.html:21disabled
+console-xhr-logging.html:40sending a GET request to resources/xhr-exists.html
+console-xhr-logging.html:40sending a GET request to resources/xhr-does-not-exist.html
+resources/xhr-does-not-exist.htmlFailed to load resource: the server responded with a status of 404 (Not Found)
+console-xhr-logging.html:40sending a POST request to resources/xhr-exists.html
+
diff --git a/LayoutTests/http/tests/inspector/console-xhr-logging.html b/LayoutTests/http/tests/inspector/console-xhr-logging.html
new file mode 100755
index 0000000..1c7582e
--- /dev/null
+++ b/LayoutTests/http/tests/inspector/console-xhr-logging.html
@@ -0,0 +1,79 @@
+<html>
+<head>
+<script src="inspector-test.js"></script>
+<script src="console-tests.js"></script>
+<script>
+
+function doit()
+{
+    // Enable XMLHttpRequest Logging.
+    evaluateInWebInspector("frontend_enableXMLHttpRequestLogging", function(result) {
+        console.log(result);
+        makeRequests();
+        testDisabled();
+    });
+}
+
+function testDisabled()
+{
+    // Disable XMLHttpRequest Logging.
+    evaluateInWebInspector("frontend_disableXMLHttpRequestLogging", function(result) {
+        console.log(result);
+        makeRequests();
+        dumpConsoleMessages();
+    });
+}
+
+function makeRequests()
+{
+    // 1. Page that exists.
+    requestHelper("GET", "resources/xhr-exists.html");
+    // 2. Page that doesn't exist.
+    requestHelper("GET", "resources/xhr-does-not-exist.html");
+    // 3. POST to a page.
+    requestHelper("POST", "resources/xhr-exists.html");
+}
+
+function requestHelper(method, url)
+{
+    // Make synchronous requests for simplicity.
+    console.log("sending a %s request to %s", method, url);
+    var xhr = new XMLHttpRequest();
+    xhr.open(method, url, false);
+    xhr.send();
+}
+
+function frontend_enableXMLHttpRequestLogging(testController)
+{
+    InspectorBackend.enableMonitoringXHR();
+    if (WebInspector.monitoringXHREnabled)
+        return "enabled";
+
+    testController.waitUntilDone();
+    frontend_addSniffer(WebInspector, "monitoringXHRWasEnabled", function() {
+         testController.notifyDone("enabled");
+    });
+}
+
+function frontend_disableXMLHttpRequestLogging(testController)
+{
+    InspectorBackend.disableMonitoringXHR();
+    if (!WebInspector.monitoringXHREnabled)
+        return "disabled";
+
+    testController.waitUntilDone();
+    frontend_addSniffer(WebInspector, "monitoringXHRWasDisabled", function() {
+        testController.notifyDone("disabled");
+    });
+}
+
+</script>
+</head>
+
+<body onload="onload()">
+<p>
+Tests that XMLHttpRequest Logging works when Enabled and doesn't show logs when Disabled.
+</p>
+
+</body>
+</html>
diff --git a/LayoutTests/http/tests/inspector/resources/xhr-exists.html b/LayoutTests/http/tests/inspector/resources/xhr-exists.html
new file mode 100644
index 0000000..8631aea
--- /dev/null
+++ b/LayoutTests/http/tests/inspector/resources/xhr-exists.html
@@ -0,0 +1 @@
+<p>Existing File</p>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list