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

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

Issue 23506013: Make the embedder responsible for creating the WebFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add WebViewHelper for unittests. Created 7 years, 3 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
Index: Source/web/tests/LinkHighlightTest.cpp
diff --git a/Source/web/tests/LinkHighlightTest.cpp b/Source/web/tests/LinkHighlightTest.cpp
index 4fcf06d73b72db25fba34cbeca9beb9c0b4f6ccf..c9eb91e2a87c16a695f6a761be589bded75c4abe 100644
--- a/Source/web/tests/LinkHighlightTest.cpp
+++ b/Source/web/tests/LinkHighlightTest.cpp
@@ -59,7 +59,8 @@ TEST(LinkHighlightTest, verifyWebViewImplIntegration)
const std::string fileName("test_touch_link_highlight.html");
URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(baseURL.c_str()), WebString::fromUTF8("test_touch_link_highlight.html"));
- WebViewImpl* webViewImpl = toWebViewImpl(FrameTestHelpers::createWebViewAndLoad(baseURL + fileName, true));
+ FrameTestHelpers::WebViewHelper webViewHelper;
+ WebViewImpl* webViewImpl = toWebViewImpl(webViewHelper.initializeAndLoad(baseURL + fileName, true));
int pageWidth = 640;
int pageHeight = 480;
webViewImpl->resize(WebSize(pageWidth, pageHeight));
@@ -121,7 +122,6 @@ TEST(LinkHighlightTest, verifyWebViewImplIntegration)
}
ASSERT_FALSE(webViewImpl->linkHighlight());
- webViewImpl->close();
Platform::current()->unitTestSupport()->unregisterAllMockedURLs();
}
@@ -164,7 +164,8 @@ TEST(LinkHighlightTest, resetDuringNodeRemoval)
const std::string fileName("test_touch_link_highlight.html");
URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(baseURL.c_str()), WebString::fromUTF8("test_touch_link_highlight.html"));
- WebViewImpl* webViewImpl = toWebViewImpl(FrameTestHelpers::createWebViewAndLoad(baseURL + fileName, true, 0, compositingWebViewClient()));
+ FrameTestHelpers::WebViewHelper webViewHelper;
+ WebViewImpl* webViewImpl = toWebViewImpl(webViewHelper.initializeAndLoad(baseURL + fileName, true, 0, compositingWebViewClient()));
int pageWidth = 640;
int pageHeight = 480;
@@ -191,7 +192,6 @@ TEST(LinkHighlightTest, resetDuringNodeRemoval)
webViewImpl->layout();
EXPECT_FALSE(highlightLayer->linkHighlight());
- webViewImpl->close();
Platform::current()->unitTestSupport()->unregisterAllMockedURLs();
}

Powered by Google App Engine
This is Rietveld 408576698