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

Side by Side Diff: ash/wm/workspace/workspace_manager_unittest.cc

Issue 10442017: Rename GetRootWindow() -> GetPrimaryRootWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git-try -b linux_chromeos,win_aura Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/screen_ash.h" 7 #include "ash/screen_ash.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 EXPECT_EQ(w2.get(), workspaces()[0]->windows()[1]); 444 EXPECT_EQ(w2.get(), workspaces()[0]->windows()[1]);
445 EXPECT_TRUE(w2->layer()->IsDrawn()); 445 EXPECT_TRUE(w2->layer()->IsDrawn());
446 } 446 }
447 447
448 // Verifies ShelfLayoutManager's visibility/auto-hide state is correctly 448 // Verifies ShelfLayoutManager's visibility/auto-hide state is correctly
449 // updated. 449 // updated.
450 TEST_F(WorkspaceManagerTest, ShelfStateUpdated) { 450 TEST_F(WorkspaceManagerTest, ShelfStateUpdated) {
451 // Since ShelfLayoutManager queries for mouse location, move the mouse so 451 // Since ShelfLayoutManager queries for mouse location, move the mouse so
452 // it isn't over the shelf. 452 // it isn't over the shelf.
453 aura::test::EventGenerator generator( 453 aura::test::EventGenerator generator(
454 Shell::GetInstance()->GetRootWindow(), gfx::Point()); 454 Shell::GetPrimaryRootWindow(), gfx::Point());
455 generator.MoveMouseTo(0, 0); 455 generator.MoveMouseTo(0, 0);
456 456
457 // Two windows, w1 normal, w2 maximized. 457 // Two windows, w1 normal, w2 maximized.
458 scoped_ptr<Window> w1(CreateTestWindow()); 458 scoped_ptr<Window> w1(CreateTestWindow());
459 w1->SetBounds(gfx::Rect(0, 1, 101, 102)); 459 w1->SetBounds(gfx::Rect(0, 1, 101, 102));
460 w1->Show(); 460 w1->Show();
461 461
462 ShelfLayoutManager* shelf = Shell::GetInstance()->shelf(); 462 ShelfLayoutManager* shelf = Shell::GetInstance()->shelf();
463 463
464 EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state()); 464 EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 w1->Show(); 664 w1->Show();
665 w1->SetProperty(aura::client::kAnimationsDisabledKey, true); 665 w1->SetProperty(aura::client::kAnimationsDisabledKey, true);
666 666
667 w2->Show(); 667 w2->Show();
668 w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); 668 w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
669 EXPECT_TRUE(w1->GetProperty(aura::client::kAnimationsDisabledKey)); 669 EXPECT_TRUE(w1->GetProperty(aura::client::kAnimationsDisabledKey));
670 } 670 }
671 671
672 } // namespace internal 672 } // namespace internal
673 } // namespace ash 673 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_event_filter_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698