[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 12:14:49 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 096ad59057f399e8b17ab7dd51356ad410f34ba9
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 17 20:17:09 2010 +0000

    2010-08-17  Sheriff Bot  <webkit.review.bot at gmail.com>
    
            Unreviewed, rolling out r65516.
            http://trac.webkit.org/changeset/65516
            https://bugs.webkit.org/show_bug.cgi?id=44126
    
            broke chromium unit tests on mac and linux (Requested by
            johnny_g on #webkit).
    
            * WebKit.gyp:
            * src/WebFrameImpl.cpp:
            (WebKit::frameContentAsPlainText):
            * tests/RunAllTests.cpp:
            (main):
            * tests/WebFrameTest.cpp: Removed.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65536 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index ee4e741..c5b2a5d 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-17  Sheriff Bot  <webkit.review.bot at gmail.com>
+
+        Unreviewed, rolling out r65516.
+        http://trac.webkit.org/changeset/65516
+        https://bugs.webkit.org/show_bug.cgi?id=44126
+
+        broke chromium unit tests on mac and linux (Requested by
+        johnny_g on #webkit).
+
+        * WebKit.gyp:
+        * src/WebFrameImpl.cpp:
+        (WebKit::frameContentAsPlainText):
+        * tests/RunAllTests.cpp:
+        (main):
+        * tests/WebFrameTest.cpp: Removed.
+
 2010-08-17  Jay Civelli  <jcivelli at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 2b4ad3a..c338b59 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -700,7 +700,6 @@
                         '<(chromium_src_dir)/base/base.gyp:base_i18n',
                         '<(chromium_src_dir)/base/base.gyp:test_support_base',
                         '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
-                        '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
                     ],
                     'include_dirs': [
                         'public',
@@ -719,11 +718,10 @@
                     'conditions': [
                         ['OS=="win"', {
                             'sources': [
-                                # FIXME: Port PopupMenuTest and WebFrameTest to Linux and Mac.
+                                # FIXME: Port PopupMenuTest to Linux and Mac.
                                 'tests/PopupMenuTest.cpp',
                                 'tests/TransparencyWinTest.cpp',
                                 'tests/UniscribeHelperTest.cpp',
-                                'tests/WebFrameTest.cpp',
                             ],
                         }],
                         ['OS=="mac"', {
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index f5ed170..f1c30e2 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -234,15 +234,6 @@ static void frameContentAsPlainText(size_t maxChars, Frame* frame,
     // Recursively walk the children.
     FrameTree* frameTree = frame->tree();
     for (Frame* curChild = frameTree->firstChild(); curChild; curChild = curChild->tree()->nextSibling()) {
-        // Ignore the text of non-visible frames.
-        RenderView* contentRenderer = curChild->contentRenderer();
-        RenderPart* ownerRenderer = curChild->ownerRenderer();        
-        if (!contentRenderer || !contentRenderer->width() || !contentRenderer->height()
-            || (contentRenderer->x() + contentRenderer->width() <= 0) || (contentRenderer->y() + contentRenderer->height() <= 0)
-            || (ownerRenderer && ownerRenderer->style() && ownerRenderer->style()->visibility() != VISIBLE)) {
-            continue;
-        }
-
         // Make sure the frame separator won't fill up the buffer, and give up if
         // it will. The danger is if the separator will make the buffer longer than
         // maxChars. This will cause the computation above:
diff --git a/WebKit/chromium/tests/RunAllTests.cpp b/WebKit/chromium/tests/RunAllTests.cpp
index cfcfbee..0f3f82f 100644
--- a/WebKit/chromium/tests/RunAllTests.cpp
+++ b/WebKit/chromium/tests/RunAllTests.cpp
@@ -33,15 +33,18 @@
 
 #include "WebKit.h"
 #include "WebKitClient.h"
-#include <webkit/support/webkit_support.h>
+
+// WebKitClient has a protected destructor, so we need to subclass.
+class DummyWebKitClient : public WebKit::WebKitClient {
+};
 
 int main(int argc, char** argv)
 {
-    TestSuite testSuite(argc, argv);
-    // TestSuite must be created before SetUpTestEnvironment so it performs
-    // initializations needed by WebKit support.
-    webkit_support::SetUpTestEnvironmentForUnitTests();
-    int result = testSuite.Run();
-    webkit_support::TearDownTestEnvironment();
+    DummyWebKitClient dummyClient;
+    WebKit::initialize(&dummyClient);
+
+    int result = TestSuite(argc, argv).Run();
+
+    WebKit::shutdown();
     return result;
 }
diff --git a/WebKit/chromium/tests/WebFrameTest.cpp b/WebKit/chromium/tests/WebFrameTest.cpp
deleted file mode 100644
index cf91cb4..0000000
--- a/WebKit/chromium/tests/WebFrameTest.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <googleurl/src/gurl.h>
-#include <gtest/gtest.h>
-#include <webkit/support/webkit_support.h>
-#include "WebFrame.h"
-#include "WebFrameClient.h"
-#include "WebString.h"
-#include "WebURL.h"
-#include "WebURLRequest.h"
-#include "WebURLResponse.h"
-#include "WebView.h"
-
-using namespace WebKit;
-
-namespace {
-
-class WebFrameTest : public testing::Test {
-public:
-    WebFrameTest() {}
-
-    virtual void TearDown()
-    {
-        webkit_support::UnregisterAllMockedURLs();
-    }
-
-    void registerMockedURLLoad(const WebURL& url, const WebURLResponse& response, const WebString& fileName)
-    {
-        std::string filePath = webkit_support::GetWebKitRootDir().utf8();
-        filePath.append("/WebKit/chromium/tests/data/");
-        filePath.append(fileName.utf8());
-        webkit_support::RegisterMockedURL(url, response, WebString::fromUTF8(filePath));
-    }
-
-    void serveRequests()
-    {
-        webkit_support::ServeAsynchronousMockedRequests();
-    }
-};
-
-class TestWebFrameClient : public WebFrameClient {
-};
-
-TEST_F(WebFrameTest, ContentText)
-{
-    // Register our resources.
-    WebURLResponse response;
-    response.initialize();
-    response.setMIMEType("text/html");
-    std::string rootURL = "http://www.test.com/";
-    const char* files[] = { "iframes_test.html", "visible_iframe.html",
-                            "invisible_iframe.html", "zero_sized_iframe.html" };
-    for (int i = 0; i < (sizeof(files) / sizeof(char*)); ++i) {
-        WebURL webURL = GURL(rootURL + files[i]);
-        registerMockedURLLoad(webURL, response, WebString::fromUTF8(files[i]));
-    }
-
-    // Create and initialize the WebView.    
-    TestWebFrameClient webFrameClient;
-    WebView* webView = WebView::create(0, 0);
-    webView->initializeMainFrame(&webFrameClient);
-
-    // Load the main frame URL.
-    WebURL testURL(GURL(rootURL + files[0]));
-    WebURLRequest urlRequest;
-    urlRequest.initialize();
-    urlRequest.setURL(testURL);
-    webView->mainFrame()->loadRequest(urlRequest);
-
-    // Load all pending asynchronous requests.
-    serveRequests();
-
-    // Now retrieve the frames text and test it only includes visible elements.
-    std::string content = webView->mainFrame()->contentAsText(1024).utf8();
-    EXPECT_NE(std::string::npos, content.find(" visible paragraph"));
-    EXPECT_NE(std::string::npos, content.find(" visible iframe"));
-    EXPECT_EQ(std::string::npos, content.find(" invisible pararaph"));
-    EXPECT_EQ(std::string::npos, content.find(" invisible iframe"));
-    EXPECT_EQ(std::string::npos, content.find("iframe with zero size"));
-
-    webView->close();
-}
-
-}

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list