OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_controller.h" | 5 #include "ash/wm/workspace_controller.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "ash/aura/wm_window_aura.h" | 9 #include "ash/aura/wm_window_aura.h" |
10 #include "ash/common/shell_window_ids.h" | 10 #include "ash/common/shell_window_ids.h" |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 EXPECT_TRUE(GetWindowOverlapsShelf()); | 504 EXPECT_TRUE(GetWindowOverlapsShelf()); |
505 } | 505 } |
506 | 506 |
507 // Verifies going from maximized to minimized sets the right state for painting | 507 // Verifies going from maximized to minimized sets the right state for painting |
508 // the background of the launcher. | 508 // the background of the launcher. |
509 TEST_F(WorkspaceControllerTest, MinimizeResetsVisibility) { | 509 TEST_F(WorkspaceControllerTest, MinimizeResetsVisibility) { |
510 std::unique_ptr<Window> w1(CreateTestWindow()); | 510 std::unique_ptr<Window> w1(CreateTestWindow()); |
511 w1->Show(); | 511 w1->Show(); |
512 wm::ActivateWindow(w1.get()); | 512 wm::ActivateWindow(w1.get()); |
513 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); | 513 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); |
514 EXPECT_EQ(wm::SHELF_BACKGROUND_MAXIMIZED, | 514 EXPECT_EQ(SHELF_BACKGROUND_MAXIMIZED, shelf_widget()->GetBackgroundType()); |
515 shelf_widget()->GetBackgroundType()); | |
516 | 515 |
517 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED); | 516 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED); |
518 Shelf* shelf = Shelf::ForPrimaryDisplay(); | 517 Shelf* shelf = Shelf::ForPrimaryDisplay(); |
519 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); | 518 EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState()); |
520 EXPECT_EQ(wm::SHELF_BACKGROUND_DEFAULT, shelf_widget()->GetBackgroundType()); | 519 EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, shelf_widget()->GetBackgroundType()); |
521 } | 520 } |
522 | 521 |
523 // Verifies window visibility during various workspace changes. | 522 // Verifies window visibility during various workspace changes. |
524 TEST_F(WorkspaceControllerTest, VisibilityTests) { | 523 TEST_F(WorkspaceControllerTest, VisibilityTests) { |
525 std::unique_ptr<Window> w1(CreateTestWindow()); | 524 std::unique_ptr<Window> w1(CreateTestWindow()); |
526 w1->Show(); | 525 w1->Show(); |
527 EXPECT_TRUE(w1->IsVisible()); | 526 EXPECT_TRUE(w1->IsVisible()); |
528 EXPECT_EQ(1.0f, w1->layer()->GetCombinedOpacity()); | 527 EXPECT_EQ(1.0f, w1->layer()->GetCombinedOpacity()); |
529 | 528 |
530 // Create another window, activate it and make it fullscreen. | 529 // Create another window, activate it and make it fullscreen. |
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 ui::EventTimeForNow()); | 1609 ui::EventTimeForNow()); |
1611 target = targeter->FindTargetForEvent(root, &touch); | 1610 target = targeter->FindTargetForEvent(root, &touch); |
1612 if (points[i].is_target_hit) | 1611 if (points[i].is_target_hit) |
1613 EXPECT_EQ(window.get(), target); | 1612 EXPECT_EQ(window.get(), target); |
1614 else | 1613 else |
1615 EXPECT_NE(window.get(), target); | 1614 EXPECT_NE(window.get(), target); |
1616 } | 1615 } |
1617 } | 1616 } |
1618 | 1617 |
1619 } // namespace ash | 1618 } // namespace ash |
OLD | NEW |