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

Side by Side Diff: ash/desktop_background/desktop_background_controller_unittest.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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
« no previous file with comments | « ash/autoclick/autoclick_unittest.cc ('k') | ash/dip_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/desktop_background/desktop_background_controller.h" 5 #include "ash/desktop_background/desktop_background_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <cstdlib> 8 #include <cstdlib>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 27 matching lines...) Expand all
38 namespace { 38 namespace {
39 39
40 // Containers IDs used for tests. 40 // Containers IDs used for tests.
41 const int kDesktopBackgroundId = 41 const int kDesktopBackgroundId =
42 ash::internal::kShellWindowId_DesktopBackgroundContainer; 42 ash::internal::kShellWindowId_DesktopBackgroundContainer;
43 const int kLockScreenBackgroundId = 43 const int kLockScreenBackgroundId =
44 ash::internal::kShellWindowId_LockScreenBackgroundContainer; 44 ash::internal::kShellWindowId_LockScreenBackgroundContainer;
45 45
46 // Returns number of child windows in a shell window container. 46 // Returns number of child windows in a shell window container.
47 int ChildCountForContainer(int container_id) { 47 int ChildCountForContainer(int container_id) {
48 RootWindow* root = ash::Shell::GetPrimaryRootWindow(); 48 Window* root = ash::Shell::GetPrimaryRootWindow();
49 Window* container = root->GetChildById(container_id); 49 Window* container = root->GetChildById(container_id);
50 return static_cast<int>(container->children().size()); 50 return static_cast<int>(container->children().size());
51 } 51 }
52 52
53 class TestObserver : public DesktopBackgroundControllerObserver { 53 class TestObserver : public DesktopBackgroundControllerObserver {
54 public: 54 public:
55 explicit TestObserver(DesktopBackgroundController* controller) 55 explicit TestObserver(DesktopBackgroundController* controller)
56 : controller_(controller) { 56 : controller_(controller) {
57 DCHECK(controller_); 57 DCHECK(controller_);
58 controller_->AddObserver(this); 58 controller_->AddObserver(this);
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 DesktopBackgroundController::GetMaxDisplaySizeInNative().ToString()); 624 DesktopBackgroundController::GetMaxDisplaySizeInNative().ToString());
625 625
626 // Maximum width and height belongs to different displays. 626 // Maximum width and height belongs to different displays.
627 UpdateDisplay("400x300,100x500"); 627 UpdateDisplay("400x300,100x500");
628 EXPECT_EQ( 628 EXPECT_EQ(
629 "400x500", 629 "400x500",
630 DesktopBackgroundController::GetMaxDisplaySizeInNative().ToString()); 630 DesktopBackgroundController::GetMaxDisplaySizeInNative().ToString());
631 } 631 }
632 632
633 } // namespace ash 633 } // namespace ash
OLDNEW
« no previous file with comments | « ash/autoclick/autoclick_unittest.cc ('k') | ash/dip_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698