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 <cstdlib> | 5 #include <cstdlib> |
6 #include <cstring> | 6 #include <cstring> |
7 | 7 |
8 #include "ash/ash_resources/grit/ash_resources.h" | 8 #include "ash/ash_resources/grit/ash_resources.h" |
9 #include "ash/desktop_background/desktop_background_controller.h" | 9 #include "ash/desktop_background/desktop_background_controller.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "chrome/test/base/testing_browser_process.h" | 23 #include "chrome/test/base/testing_browser_process.h" |
24 #include "chromeos/chromeos_switches.h" | 24 #include "chromeos/chromeos_switches.h" |
25 #include "chromeos/settings/cros_settings_names.h" | 25 #include "chromeos/settings/cros_settings_names.h" |
26 #include "chromeos/settings/cros_settings_provider.h" | 26 #include "chromeos/settings/cros_settings_provider.h" |
27 #include "content/public/test/test_browser_thread.h" | 27 #include "content/public/test/test_browser_thread.h" |
28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
29 #include "ui/base/resource/resource_bundle.h" | 29 #include "ui/base/resource/resource_bundle.h" |
30 | 30 |
31 using namespace ash; | 31 using namespace ash; |
32 | 32 |
33 namespace { | |
34 | |
35 const char kTestUser1[] = "test-user@example.com"; | 33 const char kTestUser1[] = "test-user@example.com"; |
36 const char kTestUser1Hash[] = "test-user@example.com-hash"; | 34 const char kTestUser1Hash[] = "test-user@example.com-hash"; |
37 | 35 |
38 const int kLargeWallpaperResourceId = IDR_AURA_WALLPAPER_DEFAULT_LARGE; | |
39 const int kSmallWallpaperResourceId = IDR_AURA_WALLPAPER_DEFAULT_SMALL; | |
40 | |
41 } // namespace | |
42 | |
43 namespace chromeos { | 36 namespace chromeos { |
44 | 37 |
45 class WallpaperManagerTest : public test::AshTestBase { | 38 class WallpaperManagerTest : public test::AshTestBase { |
46 public: | 39 public: |
47 WallpaperManagerTest() : command_line_(CommandLine::NO_PROGRAM) {} | 40 WallpaperManagerTest() : command_line_(CommandLine::NO_PROGRAM) {} |
48 | 41 |
49 virtual ~WallpaperManagerTest() {} | 42 virtual ~WallpaperManagerTest() {} |
50 | 43 |
51 virtual void SetUp() OVERRIDE { | 44 virtual void SetUp() OVERRIDE { |
52 test::AshTestBase::SetUp(); | 45 test::AshTestBase::SetUp(); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // AppendGuestSwitch being called. | 121 // AppendGuestSwitch being called. |
129 WallpaperManager::Get()->InitializeWallpaper(); | 122 WallpaperManager::Get()->InitializeWallpaper(); |
130 EXPECT_TRUE(test_api->current_wallpaper_path().empty()); | 123 EXPECT_TRUE(test_api->current_wallpaper_path().empty()); |
131 UserManager::Get()->UserLoggedIn(UserManager::kGuestUserName, | 124 UserManager::Get()->UserLoggedIn(UserManager::kGuestUserName, |
132 UserManager::kGuestUserName, false); | 125 UserManager::kGuestUserName, false); |
133 EXPECT_FALSE(ash::Shell::GetInstance()->desktop_background_controller()-> | 126 EXPECT_FALSE(ash::Shell::GetInstance()->desktop_background_controller()-> |
134 SetDefaultWallpaper(true)); | 127 SetDefaultWallpaper(true)); |
135 } | 128 } |
136 | 129 |
137 } // namespace chromeos | 130 } // namespace chromeos |
OLD | NEW |