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

Unified Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 1093713002: Revert of Send resize event when the screen info changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_unittest.cc
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 2f7c5dc980386f4d0a11cd24f1614b97bae7b404..46acbd1dbae6d48581ac9393358222dd4d686b81 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -141,7 +141,6 @@
using RenderWidgetHostImpl::OnUpdateRect;
using RenderWidgetHostImpl::RendererExited;
using RenderWidgetHostImpl::SetInitialRenderSizeParams;
- using RenderWidgetHostImpl::UpdateScreenInfo;
using RenderWidgetHostImpl::old_resize_params_;
using RenderWidgetHostImpl::is_hidden_;
using RenderWidgetHostImpl::resize_ack_pending_;
@@ -447,7 +446,6 @@
void SetInitialRenderSizeParams() {
ViewMsg_Resize_Params render_size_params;
- host_->UpdateScreenInfo();
host_->GetResizeParams(&render_size_params);
host_->SetInitialRenderSizeParams(render_size_params);
}
@@ -606,8 +604,8 @@
// -----------------------------------------------------------------------------
TEST_F(RenderWidgetHostTest, Resize) {
- // The initial bounds is the empty rect, so setting it to the same thing
- // shouldn't send the resize message.
+ // The initial bounds is the empty rect, and the screen info hasn't been sent
+ // yet, so setting it to the same thing shouldn't send the resize message.
view_->set_bounds(gfx::Rect());
host_->WasResized();
EXPECT_FALSE(host_->resize_ack_pending_);
@@ -718,14 +716,6 @@
host_->WasResized();
EXPECT_FALSE(host_->resize_ack_pending_);
EXPECT_EQ(gfx::Size(0, 31), host_->old_resize_params_->new_size);
- EXPECT_TRUE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID));
-}
-
-// Test that a resize event is sent if InvalidateScreenInfo() was called.
-TEST_F(RenderWidgetHostTest, ResizeScreenInfo) {
- host_->InvalidateScreenInfo();
- host_->WasResized();
- EXPECT_FALSE(host_->resize_ack_pending_);
EXPECT_TRUE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID));
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698