Index: content/renderer/browser_plugin/browser_plugin_browsertest.cc |
diff --git a/content/renderer/browser_plugin/browser_plugin_browsertest.cc b/content/renderer/browser_plugin/browser_plugin_browsertest.cc |
index f06f6870466cbb13210590d5dd23a88b4de6f896..6abede33bcf22341eb949a5725ecd01ee6c39a4f 100644 |
--- a/content/renderer/browser_plugin/browser_plugin_browsertest.cc |
+++ b/content/renderer/browser_plugin/browser_plugin_browsertest.cc |
@@ -173,79 +173,6 @@ TEST_F(BrowserPluginTest, InitialResize) { |
ASSERT_TRUE(browser_plugin); |
} |
-TEST_F(BrowserPluginTest, ResizeFlowControl) { |
- LoadHTML(GetHTMLForBrowserPluginObject().c_str()); |
- MockBrowserPlugin* browser_plugin = GetCurrentPlugin(); |
- ASSERT_TRUE(browser_plugin); |
- int instance_id = browser_plugin->browser_plugin_instance_id(); |
- // Send an UpdateRect to the BrowserPlugin to make sure the browser sees a |
- // resize related (SetAutoSize) message. |
- { |
- // We send a stale UpdateRect to the BrowserPlugin. |
- BrowserPluginMsg_UpdateRect_Params update_rect_params; |
- update_rect_params.view_size = gfx::Size(640, 480); |
- update_rect_params.is_resize_ack = true; |
- BrowserPluginMsg_UpdateRect msg(instance_id, update_rect_params); |
- browser_plugin->OnMessageReceived(msg); |
- } |
- |
- browser_plugin_manager()->sink().ClearMessages(); |
- |
- // Resize the browser plugin three times. |
- |
- ExecuteJavaScript("document.getElementById('browserplugin').width = '641px'"); |
- GetMainFrame()->view()->layout(); |
- ProcessPendingMessages(); |
- |
- ExecuteJavaScript("document.getElementById('browserplugin').width = '642px'"); |
- GetMainFrame()->view()->layout(); |
- ProcessPendingMessages(); |
- |
- ExecuteJavaScript("document.getElementById('browserplugin').width = '643px'"); |
- GetMainFrame()->view()->layout(); |
- ProcessPendingMessages(); |
- |
- // Expect to see one resize messsage in the sink. BrowserPlugin will not issue |
- // subsequent resize requests until the first request is satisfied by the |
- // guest. The rest of the messages could be |
- // BrowserPluginHostMsg_UpdateGeometry msgs. |
- EXPECT_LE(1u, browser_plugin_manager()->sink().message_count()); |
- for (size_t i = 0; i < browser_plugin_manager()->sink().message_count(); |
- ++i) { |
- const IPC::Message* msg = browser_plugin_manager()->sink().GetMessageAt(i); |
- if (msg->type() != BrowserPluginHostMsg_ResizeGuest::ID) |
- EXPECT_EQ(msg->type(), BrowserPluginHostMsg_UpdateGeometry::ID); |
- } |
- const IPC::Message* msg = |
- browser_plugin_manager()->sink().GetUniqueMessageMatching( |
- BrowserPluginHostMsg_ResizeGuest::ID); |
- ASSERT_TRUE(msg); |
- BrowserPluginHostMsg_ResizeGuest::Param param; |
- BrowserPluginHostMsg_ResizeGuest::Read(msg, ¶m); |
- instance_id = param.a; |
- BrowserPluginHostMsg_ResizeGuest_Params params = param.b; |
- EXPECT_EQ(641, params.view_size.width()); |
- EXPECT_EQ(480, params.view_size.height()); |
- |
- { |
- // We send a stale UpdateRect to the BrowserPlugin. |
- BrowserPluginMsg_UpdateRect_Params update_rect_params; |
- update_rect_params.view_size = gfx::Size(641, 480); |
- update_rect_params.is_resize_ack = true; |
- BrowserPluginMsg_UpdateRect msg(instance_id, update_rect_params); |
- browser_plugin->OnMessageReceived(msg); |
- } |
- // Send the BrowserPlugin another UpdateRect, but this time with a size |
- // that matches the size of the container. |
- { |
- BrowserPluginMsg_UpdateRect_Params update_rect_params; |
- update_rect_params.view_size = gfx::Size(643, 480); |
- update_rect_params.is_resize_ack = true; |
- BrowserPluginMsg_UpdateRect msg(instance_id, update_rect_params); |
- browser_plugin->OnMessageReceived(msg); |
- } |
-} |
- |
TEST_F(BrowserPluginTest, RemovePlugin) { |
LoadHTML(GetHTMLForBrowserPluginObject().c_str()); |
MockBrowserPlugin* browser_plugin = GetCurrentPlugin(); |