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

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

Issue 23506013: Make the embedder responsible for creating the WebFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix lifetime on frame detach 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
« no previous file with comments | « Source/web/tests/WebPageSerializerTest.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebPluginContainerTest.cpp
diff --git a/Source/web/tests/WebPluginContainerTest.cpp b/Source/web/tests/WebPluginContainerTest.cpp
index 30bd62cf088520718517b1646ceb48277bd2c1af..b115189e960a2f34601f25ea91700d400f9c69f3 100644
--- a/Source/web/tests/WebPluginContainerTest.cpp
+++ b/Source/web/tests/WebPluginContainerTest.cpp
@@ -102,7 +102,8 @@ WebPluginContainer* getWebPluginContainer(WebView* webView, const WebString& id)
TEST_F(WebPluginContainerTest, WindowToLocalPointTest)
{
URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8("plugin_container.html"));
- WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "plugin_container.html", true, new TestPluginWebFrameClient());
+ FrameTestHelpers::WebViewHelper webViewHelper;
+ WebView* webView = webViewHelper.initializeAndLoad(m_baseURL + "plugin_container.html", true, new TestPluginWebFrameClient());
ASSERT(webView);
webView->settings()->setPluginsEnabled(true);
webView->resize(WebSize(300, 300));
@@ -126,14 +127,13 @@ TEST_F(WebPluginContainerTest, WindowToLocalPointTest)
WebPoint point4 = pluginContainerTwo->windowToLocalPoint(WebPoint(-10, 10));
ASSERT_EQ(10, point4.x);
ASSERT_EQ(10, point4.y);
-
- webView->close();
}
TEST_F(WebPluginContainerTest, LocalToWindowPointTest)
{
URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8("plugin_container.html"));
- WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "plugin_container.html", true, new TestPluginWebFrameClient());
+ FrameTestHelpers::WebViewHelper webViewHelper;
+ WebView* webView = webViewHelper.initializeAndLoad(m_baseURL + "plugin_container.html", true, new TestPluginWebFrameClient());
ASSERT(webView);
webView->settings()->setPluginsEnabled(true);
webView->resize(WebSize(300, 300));
@@ -157,15 +157,14 @@ TEST_F(WebPluginContainerTest, LocalToWindowPointTest)
WebPoint point4 = pluginContainerTwo->localToWindowPoint(WebPoint(10, 10));
ASSERT_EQ(-10, point4.x);
ASSERT_EQ(10, point4.y);
-
- webView->close();
}
// Verifies executing the command 'Copy' results in copying to the clipboard.
TEST_F(WebPluginContainerTest, Copy)
{
URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8("plugin_container.html"));
- WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "plugin_container.html", true, new TestPluginWebFrameClient());
+ FrameTestHelpers::WebViewHelper webViewHelper;
+ WebView* webView = webViewHelper.initializeAndLoad(m_baseURL + "plugin_container.html", true, new TestPluginWebFrameClient());
ASSERT(webView);
webView->settings()->setPluginsEnabled(true);
webView->resize(WebSize(300, 300));
@@ -175,8 +174,6 @@ TEST_F(WebPluginContainerTest, Copy)
WebElement pluginContainerOneElement = webView->mainFrame()->document().getElementById(WebString::fromUTF8("translated-plugin"));
EXPECT_TRUE(webView->mainFrame()->executeCommand("Copy", pluginContainerOneElement));
EXPECT_EQ(WebString("x"), Platform::current()->clipboard()->readPlainText(WebClipboard::Buffer()));
-
- webView->close();
}
}
« no previous file with comments | « Source/web/tests/WebPageSerializerTest.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698