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

Unified Diff: ash/wm/workspace/workspace_event_handler_unittest.cc

Issue 21979005: Make sure that 30%of restored window is always visible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 years, 4 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 | « ash/wm/window_util.cc ('k') | ash/wm/workspace/workspace_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_event_handler_unittest.cc
diff --git a/ash/wm/workspace/workspace_event_handler_unittest.cc b/ash/wm/workspace/workspace_event_handler_unittest.cc
index f97038504df03c7d1c5b0f57ee2e18cbc572b875..e592ad5a948d5458440016aca1fe96e72b604bac 100644
--- a/ash/wm/workspace/workspace_event_handler_unittest.cc
+++ b/ash/wm/workspace/workspace_event_handler_unittest.cc
@@ -248,20 +248,21 @@ TEST_F(WorkspaceEventHandlerTest,
TEST_F(WorkspaceEventHandlerTest, DoubleClickCaptionTogglesMaximize) {
aura::test::TestWindowDelegate wd;
- scoped_ptr<aura::Window> window(CreateTestWindow(&wd, gfx::Rect(1, 2, 3, 4)));
+ scoped_ptr<aura::Window> window(
+ CreateTestWindow(&wd, gfx::Rect(1, 2, 30, 40)));
window->SetProperty(aura::client::kCanMaximizeKey, true);
wd.set_window_component(HTCAPTION);
EXPECT_FALSE(wm::IsWindowMaximized(window.get()));
aura::RootWindow* root = Shell::GetPrimaryRootWindow();
aura::test::EventGenerator generator(root, window.get());
generator.DoubleClickLeftButton();
- EXPECT_NE("1,2 3x4", window->bounds().ToString());
+ EXPECT_NE("1,2 30x40", window->bounds().ToString());
EXPECT_TRUE(wm::IsWindowMaximized(window.get()));
generator.DoubleClickLeftButton();
EXPECT_FALSE(wm::IsWindowMaximized(window.get()));
- EXPECT_EQ("1,2 3x4", window->bounds().ToString());
+ EXPECT_EQ("1,2 30x40", window->bounds().ToString());
// Double-clicking the middle button shouldn't toggle the maximized state.
WindowPropertyObserver observer(window.get());
@@ -275,7 +276,7 @@ TEST_F(WorkspaceEventHandlerTest, DoubleClickCaptionTogglesMaximize) {
root->AsRootWindowHostDelegate()->OnHostMouseEvent(&release);
EXPECT_FALSE(wm::IsWindowMaximized(window.get()));
- EXPECT_EQ("1,2 3x4", window->bounds().ToString());
+ EXPECT_EQ("1,2 30x40", window->bounds().ToString());
EXPECT_FALSE(observer.DidPropertyChange(aura::client::kShowStateKey));
}
« no previous file with comments | « ash/wm/window_util.cc ('k') | ash/wm/workspace/workspace_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698