| 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;
|
|
|