Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2452)

Unified Diff: Source/web/tests/WebViewTest.cpp

Issue 272143002: Revert of Fix webkit_unit_tests to use the threaded parser and enable everywhere. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/tests/WebPageSerializerTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebViewTest.cpp
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp
index a300a81d87a4112769e38905790d2758f60b4056..18df4ef58925067546d7c0cee17b04e9dcd4d4d8 100644
--- a/Source/web/tests/WebViewTest.cpp
+++ b/Source/web/tests/WebViewTest.cpp
@@ -223,10 +223,14 @@
EXPECT_EQ(kBlue, webView->backgroundColor());
WebURL baseURL = URLTestHelpers::toKURL("http://example.com/");
- FrameTestHelpers::loadHTMLString(webView->mainFrame(), "<html><head><style>body {background-color:#227788}</style></head></html>", baseURL);
+ webView->mainFrame()->loadHTMLString(
+ "<html><head><style>body {background-color:#227788}</style></head></html>", baseURL);
+ Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
EXPECT_EQ(kDarkCyan, webView->backgroundColor());
- FrameTestHelpers::loadHTMLString(webView->mainFrame(), "<html><head><style>body {background-color:rgba(255,0,0,0.5)}</style></head></html>", baseURL);
+ webView->mainFrame()->loadHTMLString(
+ "<html><head><style>body {background-color:rgba(255,0,0,0.5)}</style></head></html>", baseURL);
+ Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
// Expected: red (50% alpha) blended atop base of kBlue.
EXPECT_EQ(0xFF7F0080, webView->backgroundColor());
@@ -829,22 +833,6 @@
m_webViewHelper.reset(); // Explicitly reset to break dependency on locally scoped client.
}
-class DropTask : public WebThread::Task {
-public:
- explicit DropTask(WebView* webView) : m_webView(webView)
- {
- }
-
- virtual void run() OVERRIDE
- {
- const WebPoint clientPoint(0, 0);
- const WebPoint screenPoint(0, 0);
- m_webView->dragTargetDrop(clientPoint, screenPoint, 0);
- }
-
-private:
- WebView* const m_webView;
-};
static void DragAndDropURL(WebViewImpl* webView, const std::string& url)
{
blink::WebDragData dragData;
@@ -859,8 +847,9 @@
const WebPoint clientPoint(0, 0);
const WebPoint screenPoint(0, 0);
webView->dragTargetDragEnter(dragData, clientPoint, screenPoint, blink::WebDragOperationCopy, 0);
- Platform::current()->currentThread()->postTask(new DropTask(webView));
- FrameTestHelpers::pumpPendingRequestsDoNotUse(webView->mainFrame());
+ webView->dragTargetDrop(clientPoint, screenPoint, 0);
+ FrameTestHelpers::runPendingTasks();
+ Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
}
TEST_F(WebViewTest, DragDropURL)
@@ -1108,7 +1097,9 @@
webViewImpl->resize(WebSize(pageWidth, pageHeight));
WebURL baseURL = URLTestHelpers::toKURL("http://example.com/");
- FrameTestHelpers::loadHTMLString(webViewImpl->mainFrame(), "<a href='http://www.test.com' style='position: absolute; left: 20px; top: 20px; width: 200px; -webkit-transform:translateZ(0);'>A link to highlight</a>", baseURL);
+ webViewImpl->mainFrame()->loadHTMLString(
+ "<a href='http://www.test.com' style='position: absolute; left: 20px; top: 20px; width: 200px; -webkit-transform:translateZ(0);'>A link to highlight</a>", baseURL);
+ Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
WebGestureEvent event;
event.type = WebInputEvent::GestureShowPress;
« no previous file with comments | « Source/web/tests/WebPageSerializerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698