| 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_event_handler.h" | 5 #include "ash/wm/workspace/workspace_event_handler.h" |
| 6 | 6 |
| 7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
| 10 #include "ash/wm/window_state.h" | 10 #include "ash/wm/window_state.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 aura::test::TestWindowDelegate wd1; | 283 aura::test::TestWindowDelegate wd1; |
| 284 aura::test::TestWindowDelegate wd2; | 284 aura::test::TestWindowDelegate wd2; |
| 285 scoped_ptr<aura::Window> window( | 285 scoped_ptr<aura::Window> window( |
| 286 CreateTestWindow(&wd1, gfx::Rect(10, 20, 30, 40))); | 286 CreateTestWindow(&wd1, gfx::Rect(10, 20, 30, 40))); |
| 287 scoped_ptr<aura::Window> child( | 287 scoped_ptr<aura::Window> child( |
| 288 CreateTestWindow(&wd2, gfx::Rect(0, 0, 1, 1))); | 288 CreateTestWindow(&wd2, gfx::Rect(0, 0, 1, 1))); |
| 289 window->SetProperty(aura::client::kCanMaximizeKey, true); | 289 window->SetProperty(aura::client::kCanMaximizeKey, true); |
| 290 wd1.set_window_component(HTCAPTION); | 290 wd1.set_window_component(HTCAPTION); |
| 291 | 291 |
| 292 child->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); | 292 child->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); |
| 293 views::corewm::AddTransientChild(window.get(), child.get()); | 293 ::wm::AddTransientChild(window.get(), child.get()); |
| 294 | 294 |
| 295 wm::WindowState* window_state = wm::GetWindowState(window.get()); | 295 wm::WindowState* window_state = wm::GetWindowState(window.get()); |
| 296 EXPECT_FALSE(window_state->IsMaximized()); | 296 EXPECT_FALSE(window_state->IsMaximized()); |
| 297 aura::Window* root = Shell::GetPrimaryRootWindow(); | 297 aura::Window* root = Shell::GetPrimaryRootWindow(); |
| 298 aura::test::EventGenerator generator(root, window.get()); | 298 aura::test::EventGenerator generator(root, window.get()); |
| 299 generator.DoubleClickLeftButton(); | 299 generator.DoubleClickLeftButton(); |
| 300 EXPECT_EQ("10,20 30x40", window->bounds().ToString()); | 300 EXPECT_EQ("10,20 30x40", window->bounds().ToString()); |
| 301 EXPECT_FALSE(window_state->IsMaximized()); | 301 EXPECT_FALSE(window_state->IsMaximized()); |
| 302 | 302 |
| 303 generator.GestureTapAt(gfx::Point(25, 25)); | 303 generator.GestureTapAt(gfx::Point(25, 25)); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->GetRootWindow())); | 450 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->GetRootWindow())); |
| 451 base::MessageLoop::current()->DeleteSoon(FROM_HERE, window.get()); | 451 base::MessageLoop::current()->DeleteSoon(FROM_HERE, window.get()); |
| 452 aura::client::GetWindowMoveClient(window->GetRootWindow()) | 452 aura::client::GetWindowMoveClient(window->GetRootWindow()) |
| 453 ->RunMoveLoop(window.release(), | 453 ->RunMoveLoop(window.release(), |
| 454 gfx::Vector2d(), | 454 gfx::Vector2d(), |
| 455 aura::client::WINDOW_MOVE_SOURCE_MOUSE); | 455 aura::client::WINDOW_MOVE_SOURCE_MOUSE); |
| 456 } | 456 } |
| 457 | 457 |
| 458 } // namespace internal | 458 } // namespace internal |
| 459 } // namespace ash | 459 } // namespace ash |
| OLD | NEW |