Diff
Modified: trunk/Source/WebCore/ChangeLog (99939 => 99940)
--- trunk/Source/WebCore/ChangeLog 2011-11-11 11:37:29 UTC (rev 99939)
+++ trunk/Source/WebCore/ChangeLog 2011-11-11 11:47:13 UTC (rev 99940)
@@ -1,3 +1,15 @@
+2011-11-11 Sheriff Bot <webkit.review....@gmail.com>
+
+ Unreviewed, rolling out r99826.
+ http://trac.webkit.org/changeset/99826
+ https://bugs.webkit.org/show_bug.cgi?id=72109
+
+ "Likely causing test flakiness" (Requested by tonyg-cr on
+ #webkit).
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::scheduleArchiveLoad):
+
2011-11-11 Nikolas Zimmermann <nzimmerm...@rim.com>
Zooming in SVGs in <object> is flakey
Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (99939 => 99940)
--- trunk/Source/WebCore/loader/DocumentLoader.cpp 2011-11-11 11:37:29 UTC (rev 99939)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp 2011-11-11 11:47:13 UTC (rev 99940)
@@ -636,28 +636,19 @@
if (!archive)
return false;
- bool failLoad = false;
switch (archive->type()) {
#if ENABLE(WEB_ARCHIVE)
case Archive::WebArchive:
// WebArchiveDebugMode means we fail loads instead of trying to fetch them from the network if they're not in the archive.
- failLoad = m_frame->settings()->webArchiveDebugModeEnabled() && ArchiveFactory::isArchiveMimeType(responseMIMEType());
- break;
+ return m_frame->settings()->webArchiveDebugModeEnabled() && ArchiveFactory::isArchiveMimeType(responseMIMEType());
#endif
#if ENABLE(MHTML)
case Archive::MHTML:
- // Always fail the load for resources not included in the MHTML.
- failLoad = true;
- break;
+ return true; // Always fail the load for resources not included in the MHTML.
#endif
default:
return false;
}
- if (failLoad) {
- loader->cancel();
- return true;
- }
- return false;
}
#endif // ENABLE(WEB_ARCHIVE)
Modified: trunk/Source/WebKit/chromium/ChangeLog (99939 => 99940)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-11-11 11:37:29 UTC (rev 99939)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-11-11 11:47:13 UTC (rev 99940)
@@ -1,3 +1,24 @@
+2011-11-11 Sheriff Bot <webkit.review....@gmail.com>
+
+ Unreviewed, rolling out r99826.
+ http://trac.webkit.org/changeset/99826
+ https://bugs.webkit.org/show_bug.cgi?id=72109
+
+ "Likely causing test flakiness" (Requested by tonyg-cr on
+ #webkit).
+
+ * tests/FrameTestHelpers.cpp:
+ (WebKit::FrameTestHelpers::registerMockedURLLoad):
+ (WebKit::FrameTestHelpers::createWebViewAndLoad):
+ * tests/FrameTestHelpers.h:
+ * tests/WebFrameTest.cpp:
+ (WebKit::WebFrameTest::registerMockedHttpURLLoad):
+ (WebKit::WebFrameTest::registerMockedChromeURLLoad):
+ (WebKit::TEST_F):
+ * tests/WebViewTest.cpp:
+ (WebKit::TEST_F):
+ * tests/data/page_with_image.mht: Removed.
+
2011-11-10 Daniel Cheng <dch...@chromium.org>
[chromium] Add plumbing for JS to write to clipboard in copy/cut events.
Modified: trunk/Source/WebKit/chromium/tests/FrameTestHelpers.cpp (99939 => 99940)
--- trunk/Source/WebKit/chromium/tests/FrameTestHelpers.cpp 2011-11-11 11:37:29 UTC (rev 99939)
+++ trunk/Source/WebKit/chromium/tests/FrameTestHelpers.cpp 2011-11-11 11:47:13 UTC (rev 99940)
@@ -45,22 +45,17 @@
namespace WebKit {
namespace FrameTestHelpers {
-void registerMockedURLLoadAsHTML(const std::string& base, const std::string& fileName)
+void registerMockedURLLoad(const std::string& base, const std::string& fileName)
{
- registerMockedURLLoad(base, fileName, "text/html");
-}
+ WebURLResponse response;
+ response.initialize();
+ response.setMIMEType("text/html");
-void registerMockedURLLoad(const std::string& base, const std::string& fileName, const std::string& mimeType)
-{
- GURL url(base + fileName);
- WebURLResponse response(url);
- response.setMIMEType(WebString::fromUTF8(mimeType));
-
std::string filePath = webkit_support::GetWebKitRootDir().utf8();
filePath += "/Source/WebKit/chromium/tests/data/";
filePath += fileName;
- webkit_support::RegisterMockedURL(url, response, WebString::fromUTF8(filePath));
+ webkit_support::RegisterMockedURL(GURL(base + fileName), response, WebString::fromUTF8(filePath));
}
void loadFrame(WebFrame* frame, const std::string& url)
@@ -89,17 +84,12 @@
return &client;
}
-WebView* createWebViewAndLoad(const std::string& url, bool enableJavascript, WebViewClient* webViewClient, WebFrameClient* webFrameClient)
+WebView* createWebViewAndLoad(const std::string& url, bool enableJavascript, WebFrameClient* webFrameClient)
{
- if (!webViewClient)
- webViewClient = defaultWebViewClient();
if (!webFrameClient)
webFrameClient = defaultWebFrameClient();
- WebView* webView = WebView::create(webViewClient);
- WebSettings* settings = webView->settings();
- settings->setImagesEnabled(true);
- settings->setLoadsImagesAutomatically(true);
- settings->setJavaScriptEnabled(enableJavascript);
+ WebView* webView = WebView::create(defaultWebViewClient());
+ webView->settings()->setJavaScriptEnabled(enableJavascript);
webView->initializeMainFrame(webFrameClient);
loadFrame(webView->mainFrame(), url);
Modified: trunk/Source/WebKit/chromium/tests/FrameTestHelpers.h (99939 => 99940)
--- trunk/Source/WebKit/chromium/tests/FrameTestHelpers.h 2011-11-11 11:37:29 UTC (rev 99939)
+++ trunk/Source/WebKit/chromium/tests/FrameTestHelpers.h 2011-11-11 11:47:13 UTC (rev 99940)
@@ -38,16 +38,14 @@
class WebFrame;
class WebFrameClient;
class WebView;
-class WebViewClient;
namespace FrameTestHelpers {
-void registerMockedURLLoadAsHTML(const std::string& base, const std::string& fileName);
-void registerMockedURLLoad(const std::string& base, const std::string& fileName, const std::string& mimeType);
+void registerMockedURLLoad(const std::string& base, const std::string& fileName);
void loadFrame(WebFrame*, const std::string& url);
-WebView* createWebViewAndLoad(const std::string& url, bool enableJavascript = false, WebViewClient* = 0, WebFrameClient* = 0);
+WebView* createWebViewAndLoad(const std::string& url, bool enableJavascript = false, WebFrameClient* = 0);
} // namespace FrameTestHelpers
} // namespace WebKit
Modified: trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp (99939 => 99940)
--- trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp 2011-11-11 11:37:29 UTC (rev 99939)
+++ trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp 2011-11-11 11:47:13 UTC (rev 99940)
@@ -64,12 +64,12 @@
void registerMockedHttpURLLoad(const std::string& fileName)
{
- FrameTestHelpers::registerMockedURLLoadAsHTML(m_baseURL, fileName);
+ FrameTestHelpers::registerMockedURLLoad(m_baseURL, fileName);
}
void registerMockedChromeURLLoad(const std::string& fileName)
{
- FrameTestHelpers::registerMockedURLLoadAsHTML(m_chromeURL, fileName);
+ FrameTestHelpers::registerMockedURLLoad(m_chromeURL, fileName);
}
protected:
@@ -175,7 +175,7 @@
registerMockedHttpURLLoad("form.html");
TestReloadDoesntRedirectWebFrameClient webFrameClient;
- WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "form.html", false, 0, &webFrameClient);
+ WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "form.html", false, &webFrameClient);
webView->mainFrame()->reload(true);
// start reload before request is delivered.
@@ -268,7 +268,7 @@
// Load a frame with an iframe, make sure we get the right create notifications.
ContextLifetimeTestWebFrameClient webFrameClient;
- WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "context_notifications_test.html", true, 0, &webFrameClient);
+ WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "context_notifications_test.html", true, &webFrameClient);
WebFrame* mainFrame = webView->mainFrame();
WebFrame* childFrame = mainFrame->firstChild();
@@ -306,7 +306,7 @@
registerMockedHttpURLLoad("context_notifications_test_frame.html");
ContextLifetimeTestWebFrameClient webFrameClient;
- WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "context_notifications_test.html", true, 0, &webFrameClient);
+ WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "context_notifications_test.html", true, &webFrameClient);
// Refresh, we should get two release notifications and two more create notifications.
webView->mainFrame()->reload(false);
@@ -345,7 +345,7 @@
registerMockedHttpURLLoad("context_notifications_test_frame.html");
ContextLifetimeTestWebFrameClient webFrameClient;
- WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "context_notifications_test.html", true, 0, &webFrameClient);
+ WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "context_notifications_test.html", true, &webFrameClient);
// Add an isolated world.
webFrameClient.reset();
Modified: trunk/Source/WebKit/chromium/tests/WebViewTest.cpp (99939 => 99940)
--- trunk/Source/WebKit/chromium/tests/WebViewTest.cpp 2011-11-11 11:37:29 UTC (rev 99939)
+++ trunk/Source/WebKit/chromium/tests/WebViewTest.cpp 2011-11-11 11:47:13 UTC (rev 99940)
@@ -37,7 +37,6 @@
#include "WebDocument.h"
#include "WebFrame.h"
#include "WebFrameImpl.h"
-#include "WebViewClient.h"
#include <gtest/gtest.h>
#include <webkit/support/webkit_support.h>
@@ -63,7 +62,7 @@
TEST_F(WebViewTest, FocusIsInactive)
{
- FrameTestHelpers::registerMockedURLLoadAsHTML(m_baseURL, "visible_iframe.html");
+ FrameTestHelpers::registerMockedURLLoad(m_baseURL, "visible_iframe.html");
WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "visible_iframe.html");
webView->setFocus(true);
@@ -80,41 +79,4 @@
webView->close();
}
-class TestWebViewClient : public WebViewClient {
-public:
- TestWebViewClient() : m_didStartLoading(false), m_didStopLoading(false), m_loadProgress(0) { }
- virtual void didStartLoading() { m_didStartLoading = true; }
- virtual void didStopLoading() { m_didStopLoading = true; }
- virtual void didChangeLoadProgress(WebFrame*, double loadProgress) { m_loadProgress = loadProgress; }
-
- bool loadingStarted() const { return m_didStartLoading; }
- bool loadingStopped() const { return m_didStopLoading; }
- double loadProgress() const { return m_loadProgress; }
-
-private:
- bool m_didStartLoading;
- bool m_didStopLoading;
- double m_loadProgress;
-};
-
-TEST_F(WebViewTest, MHTMLWithMissingResourceFinishesLoading)
-{
- TestWebViewClient webViewClient;
-
- std::string fileName = "page_with_image.mht";
- std::string fileDir = webkit_support::GetWebKitRootDir().utf8();
- fileDir.append("/Source/WebKit/chromium/tests/data/");
- // Making file loading works in unit-tests would require some additional work.
- // Mocking them as regular URLs works fine in the meantime.
- FrameTestHelpers::registerMockedURLLoad("file://" + fileDir, fileName, "multipart/related");
- WebView* webView = FrameTestHelpers::createWebViewAndLoad("file://" + fileDir + fileName, true, &webViewClient);
-
- EXPECT_TRUE(webViewClient.loadingStarted());
- EXPECT_TRUE(webViewClient.loadingStopped());
- EXPECT_EQ(1.0, webViewClient.loadProgress());
-
- // Close the WebView after checking the loading state and progress, as the close() call triggers a stop loading callback.
- webView->close();
}
-
-}
Deleted: trunk/Source/WebKit/chromium/tests/data/page_with_image.mht (99939 => 99940)
--- trunk/Source/WebKit/chromium/tests/data/page_with_image.mht 2011-11-11 11:37:29 UTC (rev 99939)
+++ trunk/Source/WebKit/chromium/tests/data/page_with_image.mht 2011-11-11 11:47:13 UTC (rev 99940)
@@ -1,31 +0,0 @@
-From: <Saved by UnMHT>
-Subject: =?iso-2022-jp?B?UGFnZSB3aXRoIHNxdWFyZQ==?=
-Date: Wed, May 18 2011 16:38:33 GMT-0700
-MIME-Version: 1.0
-Content-Type: multipart/related;
- boundary="----=_NextPart_000_0000_02C8A5EE.D896CA6B";
- type="text/html"
-
-------=_NextPart_000_0000_02C8A5EE.D896CA6B
-Content-Type: text/html; charset="ISO-8859-1"
-Content-Transfer-Encoding: quoted-printable
-Content-Location: http://localhost/page_with_image.html
-
-<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset=
-=3Diso-8859-1">
-
-
-<title>Page with square</title>
-<script>
-if (window.layoutTestController) {
- layoutTestController.dumpAsText();
-}
-
-</script>
-<base href=""
-This is a red square:<br>
-<img _onerror_=3D"document.getElementById('error').innerHTML+=3D&#x=
-27;Failed to load image!'" src=""
-<div id=3D"error"></div>
-</body></html>
-------=_NextPart_000_0000_02C8A5EE.D896CA6B--