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/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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } // namespace | 66 } // namespace |
67 | 67 |
68 class DesktopBackgroundControllerTest : public test::AshTestBase { | 68 class DesktopBackgroundControllerTest : public test::AshTestBase { |
69 public: | 69 public: |
70 DesktopBackgroundControllerTest() | 70 DesktopBackgroundControllerTest() |
71 : controller_(NULL), | 71 : controller_(NULL), |
72 wallpaper_delegate_(NULL) { | 72 wallpaper_delegate_(NULL) { |
73 } | 73 } |
74 virtual ~DesktopBackgroundControllerTest() {} | 74 virtual ~DesktopBackgroundControllerTest() {} |
75 | 75 |
76 virtual void SetUp() OVERRIDE { | 76 virtual void SetUp() override { |
77 test::AshTestBase::SetUp(); | 77 test::AshTestBase::SetUp(); |
78 // Ash shell initialization creates wallpaper. Reset it so we can manually | 78 // Ash shell initialization creates wallpaper. Reset it so we can manually |
79 // control wallpaper creation and animation in our tests. | 79 // control wallpaper creation and animation in our tests. |
80 RootWindowController* root_window_controller = | 80 RootWindowController* root_window_controller = |
81 Shell::GetPrimaryRootWindowController(); | 81 Shell::GetPrimaryRootWindowController(); |
82 root_window_controller->SetWallpaperController(NULL); | 82 root_window_controller->SetWallpaperController(NULL); |
83 root_window_controller->SetAnimatingWallpaperController(NULL); | 83 root_window_controller->SetAnimatingWallpaperController(NULL); |
84 controller_ = Shell::GetInstance()->desktop_background_controller(); | 84 controller_ = Shell::GetInstance()->desktop_background_controller(); |
85 wallpaper_delegate_ = static_cast<test::TestUserWallpaperDelegate*>( | 85 wallpaper_delegate_ = static_cast<test::TestUserWallpaperDelegate*>( |
86 Shell::GetInstance()->user_wallpaper_delegate()); | 86 Shell::GetInstance()->user_wallpaper_delegate()); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 | 340 |
341 // Maximum width and height belongs to different displays. | 341 // Maximum width and height belongs to different displays. |
342 UpdateDisplay("400x300,100x500"); | 342 UpdateDisplay("400x300,100x500"); |
343 EXPECT_EQ( | 343 EXPECT_EQ( |
344 "400x500", | 344 "400x500", |
345 DesktopBackgroundController::GetMaxDisplaySizeInNative().ToString()); | 345 DesktopBackgroundController::GetMaxDisplaySizeInNative().ToString()); |
346 } | 346 } |
347 | 347 |
348 | 348 |
349 } // namespace ash | 349 } // namespace ash |
OLD | NEW |