Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/wm/workspace/workspace_manager.h" | 5 #include "ash/wm/workspace/workspace_manager.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "ash/wm/activation_controller.h" | 9 #include "ash/wm/activation_controller.h" |
| 10 #include "ash/wm/property_util.h" | 10 #include "ash/wm/property_util.h" |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 295 | 295 |
| 296 EXPECT_TRUE(manager_->IsManagedWindow(w1.get())); | 296 EXPECT_TRUE(manager_->IsManagedWindow(w1.get())); |
| 297 // Setting the bounds should go through since the window is in the normal | 297 // Setting the bounds should go through since the window is in the normal |
| 298 // workspace. | 298 // workspace. |
| 299 w1->SetBounds(gfx::Rect(0, 0, 200, 500)); | 299 w1->SetBounds(gfx::Rect(0, 0, 200, 500)); |
| 300 EXPECT_EQ(200, w1->bounds().width()); | 300 EXPECT_EQ(200, w1->bounds().width()); |
| 301 EXPECT_EQ(500, w1->bounds().height()); | 301 EXPECT_EQ(500, w1->bounds().height()); |
| 302 } | 302 } |
| 303 | 303 |
| 304 // Assertions around open new windows maximized. | 304 // Assertions around open new windows maximized. |
| 305 TEST_F(WorkspaceManagerTest, OpenNewWindowsMaximized) { | 305 TEST_F(WorkspaceManagerTest, DISABLED_OpenNewWindowsMaximized) { |
|
oshima
2012/02/29 22:02:46
Just disabling for now. Let me know if it's ok to
| |
| 306 scoped_ptr<Window> w1(CreateTestWindowUnparented()); | 306 scoped_ptr<Window> w1(CreateTestWindowUnparented()); |
| 307 | 307 |
| 308 // Default is true for open new windows maximized. | 308 // Default is true for open new windows maximized. |
| 309 EXPECT_TRUE(manager_->open_new_windows_maximized()); | 309 EXPECT_TRUE(manager_->open_new_windows_maximized()); |
| 310 // SHOW_STATE_DEFAULT should end up maximized. | 310 // SHOW_STATE_DEFAULT should end up maximized. |
| 311 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_DEFAULT); | 311 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_DEFAULT); |
| 312 w1->SetBounds(gfx::Rect(50, 51, 52, 53)); | 312 w1->SetBounds(gfx::Rect(50, 51, 52, 53)); |
| 313 w1->SetParent(viewport()); | 313 w1->SetParent(viewport()); |
| 314 // Maximized state and bounds should be set as soon as w1 is added to the | 314 // Maximized state and bounds should be set as soon as w1 is added to the |
| 315 // parent. | 315 // parent. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 392 ASSERT_EQ(1u, workspaces()[0]->windows().size()); | 392 ASSERT_EQ(1u, workspaces()[0]->windows().size()); |
| 393 EXPECT_EQ(w1.get(), workspaces()[0]->windows()[0]); | 393 EXPECT_EQ(w1.get(), workspaces()[0]->windows()[0]); |
| 394 EXPECT_EQ(GetFullscreenBounds(w1.get()).width(), w1->bounds().width()); | 394 EXPECT_EQ(GetFullscreenBounds(w1.get()).width(), w1->bounds().width()); |
| 395 EXPECT_EQ(GetFullscreenBounds(w1.get()).height(), w1->bounds().height()); | 395 EXPECT_EQ(GetFullscreenBounds(w1.get()).height(), w1->bounds().height()); |
| 396 ASSERT_TRUE(GetRestoreBounds(w1.get())); | 396 ASSERT_TRUE(GetRestoreBounds(w1.get())); |
| 397 EXPECT_EQ(gfx::Rect(0, 0, 250, 251), *GetRestoreBounds(w1.get())); | 397 EXPECT_EQ(gfx::Rect(0, 0, 250, 251), *GetRestoreBounds(w1.get())); |
| 398 } | 398 } |
| 399 | 399 |
| 400 } // namespace internal | 400 } // namespace internal |
| 401 } // namespace ash | 401 } // namespace ash |
| OLD | NEW |