Chromium Code Reviews| Index: Source/web/tests/LinkHighlightTest.cpp |
| diff --git a/Source/web/tests/LinkHighlightTest.cpp b/Source/web/tests/LinkHighlightTest.cpp |
| index 92598146ece44141344f32523ba09d29b54af30c..b82cebb7fc61213a84b0c1bdcf60aeb9654beb58 100644 |
| --- a/Source/web/tests/LinkHighlightTest.cpp |
| +++ b/Source/web/tests/LinkHighlightTest.cpp |
| @@ -60,7 +60,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 = webViewHelper.initializeAndLoad(baseURL + fileName, true); |
| int pageWidth = 640; |
| int pageHeight = 480; |
| webViewImpl->resize(WebSize(pageWidth, pageHeight)); |
| @@ -122,7 +123,6 @@ TEST(LinkHighlightTest, verifyWebViewImplIntegration) |
| } |
| ASSERT_EQ(0U, webViewImpl->numLinkHighlights()); |
| - webViewImpl->close(); |
| Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); |
| } |
| @@ -165,7 +165,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 = webViewHelper.initializeAndLoad(baseURL + fileName, true, 0, compositingWebViewClient()); |
| int pageWidth = 640; |
| int pageHeight = 480; |
| @@ -192,7 +193,7 @@ TEST(LinkHighlightTest, resetDuringNodeRemoval) |
| webViewImpl->layout(); |
| ASSERT_EQ(0U, highlightLayer->numLinkHighlights()); |
| - webViewImpl->close(); |
| + webViewHelper.reset(); |
|
nasko
2013/09/19 22:54:12
Unneeded reset?
awong
2013/09/20 00:36:24
Done.
|
| Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); |
| } |
| @@ -202,7 +203,8 @@ TEST(LinkHighlightTest, multipleHighlights) |
| 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 = webViewHelper.initializeAndLoad(baseURL + fileName, true, 0, compositingWebViewClient()); |
| int pageWidth = 640; |
| int pageHeight = 480; |
| @@ -223,7 +225,6 @@ TEST(LinkHighlightTest, multipleHighlights) |
| webViewImpl->enableTapHighlights(highlightNodes); |
| EXPECT_EQ(2U, webViewImpl->numLinkHighlights()); |
| - webViewImpl->close(); |
| Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); |
| } |