| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } | 177 } |
| 178 | 178 |
| 179 void SetUpCommandLine(base::CommandLine* command_line) override { | 179 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 180 // Set the same switches as LoginManagerTest, except that kMultiProfiles is | 180 // Set the same switches as LoginManagerTest, except that kMultiProfiles is |
| 181 // only set when GetParam() is true and except that kLoginProfile is set | 181 // only set when GetParam() is true and except that kLoginProfile is set |
| 182 // when GetParam() is false. The latter seems to be required for the sane | 182 // when GetParam() is false. The latter seems to be required for the sane |
| 183 // start-up of user profiles. | 183 // start-up of user profiles. |
| 184 command_line->AppendSwitch(switches::kLoginManager); | 184 command_line->AppendSwitch(switches::kLoginManager); |
| 185 command_line->AppendSwitch(switches::kForceLoginManagerInTests); | 185 command_line->AppendSwitch(switches::kForceLoginManagerInTests); |
| 186 | 186 |
| 187 // Allow policy fetches to fail - these tests instead invoke InjectPolicy() |
| 188 // to directly inject and modify policy dynamically. |
| 189 command_line->AppendSwitch(switches::kAllowFailedPolicyFetchForTest); |
| 190 |
| 187 LoginManagerTest::SetUpCommandLine(command_line); | 191 LoginManagerTest::SetUpCommandLine(command_line); |
| 188 } | 192 } |
| 189 | 193 |
| 190 void SetUpOnMainThread() override { | 194 void SetUpOnMainThread() override { |
| 191 LoginManagerTest::SetUpOnMainThread(); | 195 LoginManagerTest::SetUpOnMainThread(); |
| 192 ash::Shell::GetInstance()-> | 196 ash::Shell::GetInstance()-> |
| 193 desktop_background_controller()->AddObserver(this); | 197 desktop_background_controller()->AddObserver(this); |
| 194 | 198 |
| 195 // Set up policy signing. | 199 // Set up policy signing. |
| 196 user_policy_builders_[0] = GetUserPolicyBuilder(testUsers_[0]); | 200 user_policy_builders_[0] = GetUserPolicyBuilder(testUsers_[0]); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 | 407 |
| 404 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, PersistOverLogout) { | 408 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, PersistOverLogout) { |
| 405 LoginUser(testUsers_[0].GetUserEmail()); | 409 LoginUser(testUsers_[0].GetUserEmail()); |
| 406 | 410 |
| 407 // Wait until wallpaper has been loaded. | 411 // Wait until wallpaper has been loaded. |
| 408 RunUntilWallpaperChangeCount(1); | 412 RunUntilWallpaperChangeCount(1); |
| 409 ASSERT_EQ(kRedImageColor, GetAverageBackgroundColor()); | 413 ASSERT_EQ(kRedImageColor, GetAverageBackgroundColor()); |
| 410 } | 414 } |
| 411 | 415 |
| 412 } // namespace chromeos | 416 } // namespace chromeos |
| OLD | NEW |