| 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 "ash/desktop_background/desktop_background_widget_controller.h" | 7 #include "ash/desktop_background/desktop_background_widget_controller.h" |
| 8 #include "ash/desktop_background/wallpaper_resizer.h" | 8 #include "ash/desktop_background/wallpaper_resizer.h" |
| 9 #include "ash/desktop_background/wallpaper_resizer_observer.h" | 9 #include "ash/desktop_background/wallpaper_resizer_observer.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 root->GetProperty(kAnimatingDesktopController)->GetController(false)-> | 244 root->GetProperty(kAnimatingDesktopController)->GetController(false)-> |
| 245 widget()); | 245 widget()); |
| 246 | 246 |
| 247 EXPECT_TRUE(root->GetProperty(kDesktopController)); | 247 EXPECT_TRUE(root->GetProperty(kDesktopController)); |
| 248 EXPECT_FALSE( | 248 EXPECT_FALSE( |
| 249 root->GetProperty(kAnimatingDesktopController)->GetController(false)); | 249 root->GetProperty(kAnimatingDesktopController)->GetController(false)); |
| 250 // The desktop controller should be the last created animating controller. | 250 // The desktop controller should be the last created animating controller. |
| 251 EXPECT_EQ(animatingController, root->GetProperty(kDesktopController)); | 251 EXPECT_EQ(animatingController, root->GetProperty(kDesktopController)); |
| 252 } | 252 } |
| 253 | 253 |
| 254 TEST_F(DesktopBackgroundControllerTest, ResizeToFitScreens) { | 254 #if defined(OS_WIN) |
| 255 // Broken on win8_aura. http://crbug.com/179763 |
| 256 # define MAYBE_ResizeToFitScreens DISABLED_ResizeToFitScreens |
| 257 #else |
| 258 # define MAYBE_ResizeToFitScreens ResizeToFitScreens |
| 259 #endif |
| 260 |
| 261 TEST_F(DesktopBackgroundControllerTest, MAYBE_ResizeToFitScreens) { |
| 255 // We cannot short-circuit animations for this test. | 262 // We cannot short-circuit animations for this test. |
| 256 ui::LayerAnimator::set_disable_animations_for_test(false); | 263 ui::LayerAnimator::set_disable_animations_for_test(false); |
| 257 | 264 |
| 258 // Keeps in sync with WallpaperLayout enum. | 265 // Keeps in sync with WallpaperLayout enum. |
| 259 WallpaperLayout layouts[4] = { | 266 WallpaperLayout layouts[4] = { |
| 260 WALLPAPER_LAYOUT_CENTER, | 267 WALLPAPER_LAYOUT_CENTER, |
| 261 WALLPAPER_LAYOUT_CENTER_CROPPED, | 268 WALLPAPER_LAYOUT_CENTER_CROPPED, |
| 262 WALLPAPER_LAYOUT_STRETCH, | 269 WALLPAPER_LAYOUT_STRETCH, |
| 263 WALLPAPER_LAYOUT_TILE, | 270 WALLPAPER_LAYOUT_TILE, |
| 264 }; | 271 }; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 } | 314 } |
| 308 WaitForResize(); | 315 WaitForResize(); |
| 309 RemoveWallpaperResizerObserver(); | 316 RemoveWallpaperResizerObserver(); |
| 310 EXPECT_EQ(800, controller->GetWallpaper().width()); | 317 EXPECT_EQ(800, controller->GetWallpaper().width()); |
| 311 EXPECT_EQ(700, controller->GetWallpaper().height()); | 318 EXPECT_EQ(700, controller->GetWallpaper().height()); |
| 312 } | 319 } |
| 313 } | 320 } |
| 314 | 321 |
| 315 } // namespace internal | 322 } // namespace internal |
| 316 } // namespace ash | 323 } // namespace ash |
| OLD | NEW |