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

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

Issue 3547008: Handle resize corner layout entirely in the platform BrowserWindow*/BrowserView* code... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
Index: chrome/browser/renderer_host/render_widget_host_unittest.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_unittest.cc (revision 66034)
+++ chrome/browser/renderer_host/render_widget_host_unittest.cc (working copy)
@@ -352,28 +352,33 @@
host_->WasResized();
EXPECT_FALSE(host_->resize_ack_pending_);
EXPECT_EQ(gfx::Size(), host_->in_flight_size_);
+ EXPECT_EQ(gfx::Size(), host_->current_size_);
EXPECT_TRUE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID));
// Send a rect that has no area but has either width or height set.
+ // since we do not expect ACK, current_size_ should be updated right away.
process_->sink().ClearMessages();
view_->set_bounds(gfx::Rect(0, 0, 0, 30));
host_->WasResized();
EXPECT_FALSE(host_->resize_ack_pending_);
- EXPECT_EQ(gfx::Size(0, 30), host_->in_flight_size_);
+ EXPECT_EQ(gfx::Size(), host_->in_flight_size_);
+ EXPECT_EQ(gfx::Size(0, 30), host_->current_size_);
EXPECT_TRUE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID));
// Set the same size again. It should not be sent again.
process_->sink().ClearMessages();
host_->WasResized();
EXPECT_FALSE(host_->resize_ack_pending_);
- EXPECT_EQ(gfx::Size(0, 30), host_->in_flight_size_);
+ EXPECT_EQ(gfx::Size(), host_->in_flight_size_);
+ EXPECT_EQ(gfx::Size(0, 30), host_->current_size_);
EXPECT_FALSE(process_->sink().GetFirstMessageMatching(ViewMsg_Resize::ID));
// A different size should be sent again, however.
view_->set_bounds(gfx::Rect(0, 0, 0, 31));
host_->WasResized();
EXPECT_FALSE(host_->resize_ack_pending_);
- EXPECT_EQ(gfx::Size(0, 31), host_->in_flight_size_);
+ EXPECT_EQ(gfx::Size(), host_->in_flight_size_);
+ EXPECT_EQ(gfx::Size(0, 31), host_->current_size_);
EXPECT_TRUE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID));
}
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host.cc ('k') | chrome/browser/renderer_host/render_widget_host_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698