summaryrefslogtreecommitdiffstats
path: root/content/renderer/browser_plugin/browser_plugin_browsertest.cc
diff options
context:
space:
mode:
authorfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-06 05:57:27 +0000
committerfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-06 05:57:27 +0000
commit90547d7672c25901dea55112c3d1bd14fcfb5641 (patch)
treed2b92ae8fa92bcfe4372e8f625f05d5c99948298 /content/renderer/browser_plugin/browser_plugin_browsertest.cc
parenta9cf75c69b66886f121252fd28a2823839cbf5d9 (diff)
downloadchromium_src-90547d7672c25901dea55112c3d1bd14fcfb5641.zip
chromium_src-90547d7672c25901dea55112c3d1bd14fcfb5641.tar.gz
chromium_src-90547d7672c25901dea55112c3d1bd14fcfb5641.tar.bz2
<webview>: Allocate the view instance ID from the WebView shim
This CL allocates a creates unique instance id for each <webview> in an embedder RenderView/shim instead of in BrowserPlugin. In a subsequent CL, this will permit usage of the WebRequest API prior to attachment to the DOM. This CL also fixes a potential crash on edit commands if the instance ID passed did not exist: Perhaps open two <webview> apps and then close the first one, then send edit commands to the second one. BUG=178663 Test=WebViewTest.*, WebViewInteractiveTest.* TBR=cdn@chromium.org for deleted field in browser_plugin_messages.h Review URL: https://chromiumcodereview.appspot.com/21930006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215807 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/browser_plugin/browser_plugin_browsertest.cc')
-rw-r--r--content/renderer/browser_plugin/browser_plugin_browsertest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/renderer/browser_plugin/browser_plugin_browsertest.cc b/content/renderer/browser_plugin/browser_plugin_browsertest.cc
index 46ccea6..c8e5123 100644
--- a/content/renderer/browser_plugin/browser_plugin_browsertest.cc
+++ b/content/renderer/browser_plugin/browser_plugin_browsertest.cc
@@ -192,7 +192,7 @@ TEST_F(BrowserPluginTest, InitialResize) {
EXPECT_EQ(480, params.resize_guest_params.view_rect.height());
ASSERT_TRUE(browser_plugin);
// Now the browser plugin is expecting a UpdateRect resize.
- int instance_id = browser_plugin->instance_id();
+ int instance_id = browser_plugin->guest_instance_id();
EXPECT_TRUE(browser_plugin->pending_damage_buffer_.get());
// Send the BrowserPlugin an UpdateRect equal to its container size with
@@ -289,7 +289,7 @@ TEST_F(BrowserPluginTest, ResizeFlowControl) {
LoadHTML(GetHTMLForBrowserPluginObject().c_str());
MockBrowserPlugin* browser_plugin = GetCurrentPlugin();
ASSERT_TRUE(browser_plugin);
- int instance_id = browser_plugin->instance_id();
+ int instance_id = browser_plugin->guest_instance_id();
EXPECT_TRUE(browser_plugin->pending_damage_buffer_.get());
// Send an UpdateRect to the BrowserPlugin to make it use the pending damage
// buffer.