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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 13:20:07 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 76ab46854e77b82a29f821612b554e2e1bc82ae9
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Sep 11 09:48:54 2010 +0000

    2010-09-11  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Tony Chang.
    
            Implement layoutTestController.dumpResourceResponseMIMETypes in Chromium DRT
            https://bugs.webkit.org/show_bug.cgi?id=45479
    
            Remove tests from Chromium expectations that now pass. Add
            Chromium/Linux expectations for the script test, since it reports a
            different MIME type (application/javascript vs.
            application/x-javascript).
    
            * platform/chromium-linux/fast/dom/HTMLLinkElement/prefetch-expected.txt: Removed.
            * platform/chromium-linux/fast/preloader/script-expected.txt: Added.
            * platform/chromium-mac/fast/dom/HTMLLinkElement/prefetch-expected.txt: Removed.
            * platform/chromium/test_expectations.txt:
    2010-09-11  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Tony Chang.
    
            Implement layoutTestController.dumpResourceResponseMIMETypes in Chromium DRT
            https://bugs.webkit.org/show_bug.cgi?id=45479
    
            Implement layoutTestController.dumpResourceResponseMIMETypes (modelled after
            implementation in ResourceLoadDelegate in the Mac port).
    
            * DumpRenderTree/chromium/LayoutTestController.cpp:
            (LayoutTestController::LayoutTestController):
            (LayoutTestController::dumpResourceResponseMIMETypes):
            (LayoutTestController::reset):
            * DumpRenderTree/chromium/LayoutTestController.h:
            (LayoutTestController::setShouldDumpResourceResponseMIMETypes):
            (LayoutTestController::shouldDumpResourceResponseMIMETypes):
            * DumpRenderTree/chromium/TestShell.h:
            (TestShell::shouldDumpResourceResponseMIMETypes):
            * DumpRenderTree/chromium/WebViewHost.cpp:
            (WebViewHost::didReceiveResponse):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67294 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 1ba9ac7..742c132 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,20 @@
+2010-09-11  Mihai Parparita  <mihaip at chromium.org>
+
+        Reviewed by Tony Chang.
+
+        Implement layoutTestController.dumpResourceResponseMIMETypes in Chromium DRT
+        https://bugs.webkit.org/show_bug.cgi?id=45479
+
+        Remove tests from Chromium expectations that now pass. Add
+        Chromium/Linux expectations for the script test, since it reports a
+        different MIME type (application/javascript vs.
+        application/x-javascript).
+
+        * platform/chromium-linux/fast/dom/HTMLLinkElement/prefetch-expected.txt: Removed.
+        * platform/chromium-linux/fast/preloader/script-expected.txt: Added.
+        * platform/chromium-mac/fast/dom/HTMLLinkElement/prefetch-expected.txt: Removed.
+        * platform/chromium/test_expectations.txt:
+
 2010-09-11  Tony Chang  <tony at chromium.org>
 
         Reviewed by Kent Tamura.
diff --git a/LayoutTests/platform/chromium-linux/fast/dom/HTMLLinkElement/prefetch-expected.txt b/LayoutTests/platform/chromium-linux/fast/dom/HTMLLinkElement/prefetch-expected.txt
deleted file mode 100644
index a3468f1..0000000
--- a/LayoutTests/platform/chromium-linux/fast/dom/HTMLLinkElement/prefetch-expected.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-CONSOLE MESSAGE: line 6: Uncaught TypeError: Object [object Object] has no method 'dumpResourceResponseMIMETypes'
-
-This test requires DumpRenderTree to see the log of what resources are loaded.
diff --git a/LayoutTests/platform/chromium-linux/fast/preloader/script-expected.txt b/LayoutTests/platform/chromium-linux/fast/preloader/script-expected.txt
new file mode 100644
index 0000000..d4762c1
--- /dev/null
+++ b/LayoutTests/platform/chromium-linux/fast/preloader/script-expected.txt
@@ -0,0 +1,4 @@
+script1.js has MIME type application/javascript
+This test requires DumpRenderTree to see the log of what resources are loaded.
+
+<script src=resources/script1.js></script>
diff --git a/LayoutTests/platform/chromium-mac/fast/dom/HTMLLinkElement/prefetch-expected.txt b/LayoutTests/platform/chromium-mac/fast/dom/HTMLLinkElement/prefetch-expected.txt
deleted file mode 100644
index a3468f1..0000000
--- a/LayoutTests/platform/chromium-mac/fast/dom/HTMLLinkElement/prefetch-expected.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-CONSOLE MESSAGE: line 6: Uncaught TypeError: Object [object Object] has no method 'dumpResourceResponseMIMETypes'
-
-This test requires DumpRenderTree to see the log of what resources are loaded.
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index eabfd00..e26c5a5 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -2666,14 +2666,6 @@ BUG46603 : fast/frames/lots-of-objects.html = PASS TIMEOUT
 // LayoutTestController::pageProperty is not implemented for Chromium yet.
 BUGWK35961 : printing/page-rule-selection.html = TEXT
 
-// Needs to implement layoutTestController.dumpResourceResponseMIMETypes()
-BUG46872 : fast/preloader = TEXT
-BUG46872 : fast/preloader/image.html = PASS
-BUG46872 : fast/preloader/link.html = PASS
-BUG46872 : fast/preloader/noscript.html = PASS
-BUG46872 : fast/preloader/style.html = PASS
-BUG46872 MAC LINUX : fast/dom/HTMLLinkElement/prefetch.html = TEXT
-
 BUG47035 WIN DEBUG : fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html = PASS TEXT
 
 // CSS3 Hyphenation landed in http://trac.webkit.org/changeset/61548
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index fe9c897..4dcddf1 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,25 @@
+2010-09-11  Mihai Parparita  <mihaip at chromium.org>
+
+        Reviewed by Tony Chang.
+
+        Implement layoutTestController.dumpResourceResponseMIMETypes in Chromium DRT
+        https://bugs.webkit.org/show_bug.cgi?id=45479
+
+        Implement layoutTestController.dumpResourceResponseMIMETypes (modelled after
+        implementation in ResourceLoadDelegate in the Mac port).
+
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::LayoutTestController):
+        (LayoutTestController::dumpResourceResponseMIMETypes):
+        (LayoutTestController::reset):
+        * DumpRenderTree/chromium/LayoutTestController.h:
+        (LayoutTestController::setShouldDumpResourceResponseMIMETypes):
+        (LayoutTestController::shouldDumpResourceResponseMIMETypes):
+        * DumpRenderTree/chromium/TestShell.h:
+        (TestShell::shouldDumpResourceResponseMIMETypes):
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        (WebViewHost::didReceiveResponse):
+
 2010-09-11  Eric Seidel  <eric at webkit.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
index 6f962bf..7194634 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -85,6 +85,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     bindMethod("dumpBackForwardList", &LayoutTestController::dumpBackForwardList);
     bindMethod("dumpFrameLoadCallbacks", &LayoutTestController::dumpFrameLoadCallbacks);
     bindMethod("dumpResourceLoadCallbacks", &LayoutTestController::dumpResourceLoadCallbacks);
+    bindMethod("dumpResourceResponseMIMETypes", &LayoutTestController::dumpResourceResponseMIMETypes);
     bindMethod("dumpStatusCallbacks", &LayoutTestController::dumpWindowStatusChanges);
     bindMethod("dumpTitleChanges", &LayoutTestController::dumpTitleChanges);
     bindMethod("setAcceptsEditing", &LayoutTestController::setAcceptsEditing);
@@ -291,6 +292,12 @@ void LayoutTestController::dumpResourceLoadCallbacks(const CppArgumentList&, Cpp
     result->setNull();
 }
 
+void LayoutTestController::dumpResourceResponseMIMETypes(const CppArgumentList&, CppVariant* result)
+{
+    m_dumpResourceResponseMIMETypes = true;
+    result->setNull();
+}
+
 void LayoutTestController::dumpChildFrameScrollPositions(const CppArgumentList&, CppVariant* result)
 {
     m_dumpChildFrameScrollPositions = true;
@@ -486,6 +493,7 @@ void LayoutTestController::reset()
     m_dumpEditingCallbacks = false;
     m_dumpFrameLoadCallbacks = false;
     m_dumpResourceLoadCallbacks = false;
+    m_dumpResourceResponseMIMETypes = false;
     m_dumpBackForwardList = false;
     m_dumpChildFrameScrollPositions = false;
     m_dumpChildFramesAsText = false;
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
index 7bb22ca..bc1bad4 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
@@ -100,6 +100,16 @@ public:
     // dump all frames as plain text if the dumpAsText flag is set.
     // It takes no arguments, and ignores any that may be present.
     void dumpChildFramesAsText(const CppArgumentList&, CppVariant*);
+    
+    // This function sets a flag that tells the test_shell to dump a descriptive
+    // line for each resource load callback. It takes no arguments, and ignores
+    // any that may be present.
+    void dumpResourceLoadCallbacks(const CppArgumentList&, CppVariant*);    
+    
+    // This function sets a flag that tells the test_shell to dump the MIME type
+    // for each resource that was loaded. It takes no arguments, and ignores any
+    // that may be present.
+    void dumpResourceResponseMIMETypes(const CppArgumentList&, CppVariant*);
 
     // This function sets a flag that tells the test_shell to dump all calls
     // to window.status().
@@ -230,7 +240,6 @@ public:
     // are needed to pass the layout tests.
     void dumpAsWebArchive(const CppArgumentList&, CppVariant*);
     void dumpTitleChanges(const CppArgumentList&, CppVariant*);
-    void dumpResourceLoadCallbacks(const CppArgumentList&, CppVariant*);
     void setMainFrameIsFirstResponder(const CppArgumentList&, CppVariant*);
     void display(const CppArgumentList&, CppVariant*);
     void testRepaint(const CppArgumentList&, CppVariant*);
@@ -328,6 +337,8 @@ public:
     bool shouldDumpFrameLoadCallbacks() { return m_dumpFrameLoadCallbacks; }
     void setShouldDumpFrameLoadCallbacks(bool value) { m_dumpFrameLoadCallbacks = value; }
     bool shouldDumpResourceLoadCallbacks() {return m_dumpResourceLoadCallbacks; }
+    void setShouldDumpResourceResponseMIMETypes(bool value) { m_dumpResourceResponseMIMETypes = value; }
+    bool shouldDumpResourceResponseMIMETypes() {return m_dumpResourceResponseMIMETypes; }
     bool shouldDumpStatusCallbacks() { return m_dumpWindowStatusChanges; }
     bool shouldDumpSelectionRect() { return m_dumpSelectionRect; }
     bool shouldDumpBackForwardList() { return m_dumpBackForwardList; }
@@ -447,6 +458,10 @@ private:
     // If true, the test_shell will output a descriptive line for each resource
     // load callback.
     bool m_dumpResourceLoadCallbacks;
+    
+    // If true, the test_shell will output the MIME type for each resource that 
+    // was loaded.
+    bool m_dumpResourceResponseMIMETypes;
 
     // If true, the test_shell will produce a dump of the back forward list as
     // well.
diff --git a/WebKitTools/DumpRenderTree/chromium/TestShell.h b/WebKitTools/DumpRenderTree/chromium/TestShell.h
index cb5f862..d3ed5fa 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestShell.h
+++ b/WebKitTools/DumpRenderTree/chromium/TestShell.h
@@ -107,6 +107,7 @@ public:
     void setFocus(WebKit::WebWidget*, bool enable);
     bool shouldDumpFrameLoadCallbacks() const { return (m_testIsPreparing || m_testIsPending) && layoutTestController()->shouldDumpFrameLoadCallbacks(); }
     bool shouldDumpResourceLoadCallbacks() const  { return (m_testIsPreparing || m_testIsPending) && layoutTestController()->shouldDumpResourceLoadCallbacks(); }
+    bool shouldDumpResourceResponseMIMETypes() const  { return (m_testIsPreparing || m_testIsPending) && layoutTestController()->shouldDumpResourceResponseMIMETypes(); }
     void setIsLoading(bool flag) { m_isLoading = flag; }
 
     // Called by the LayoutTestController to signal test completion.
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
index 1e3a4d6..dbadea2 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -920,12 +920,20 @@ void WebViewHost::willSendRequest(WebFrame*, unsigned identifier, WebURLRequest&
 
 void WebViewHost::didReceiveResponse(WebFrame*, unsigned identifier, const WebURLResponse& response)
 {
-    if (!m_shell->shouldDumpResourceLoadCallbacks())
-        return;
-    printResourceDescription(identifier);
-    fputs(" - didReceiveResponse ", stdout);
-    printResponseDescription(response);
-    fputs("\n", stdout);
+    if (m_shell->shouldDumpResourceLoadCallbacks()) {
+        printResourceDescription(identifier);
+        fputs(" - didReceiveResponse ", stdout);
+        printResponseDescription(response);
+        fputs("\n", stdout);
+    }
+    if (m_shell->shouldDumpResourceResponseMIMETypes()) {
+        GURL url = response.url();
+        WebString mimeType = response.mimeType();
+        printf("%s has MIME type %s\n",
+            url.ExtractFileName().c_str(),
+            // Simulate NSURLResponse's mapping of empty/unknown MIME types to application/octet-stream
+            mimeType.isEmpty() ? "application/octet-stream" : mimeType.utf8().data());
+    }
 }
 
 void WebViewHost::didFinishResourceLoad(WebFrame*, unsigned identifier)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list