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

Side by Side Diff: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc

Issue 1737453003: Revert of Reland: No longer start up profile if there was an error fetching policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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
OLDNEW
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
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
191 LoginManagerTest::SetUpCommandLine(command_line); 187 LoginManagerTest::SetUpCommandLine(command_line);
192 } 188 }
193 189
194 void SetUpOnMainThread() override { 190 void SetUpOnMainThread() override {
195 LoginManagerTest::SetUpOnMainThread(); 191 LoginManagerTest::SetUpOnMainThread();
196 ash::Shell::GetInstance()-> 192 ash::Shell::GetInstance()->
197 desktop_background_controller()->AddObserver(this); 193 desktop_background_controller()->AddObserver(this);
198 194
199 // Set up policy signing. 195 // Set up policy signing.
200 user_policy_builders_[0] = GetUserPolicyBuilder(testUsers_[0]); 196 user_policy_builders_[0] = GetUserPolicyBuilder(testUsers_[0]);
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 403
408 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, PersistOverLogout) { 404 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, PersistOverLogout) {
409 LoginUser(testUsers_[0].GetUserEmail()); 405 LoginUser(testUsers_[0].GetUserEmail());
410 406
411 // Wait until wallpaper has been loaded. 407 // Wait until wallpaper has been loaded.
412 RunUntilWallpaperChangeCount(1); 408 RunUntilWallpaperChangeCount(1);
413 ASSERT_EQ(kRedImageColor, GetAverageBackgroundColor()); 409 ASSERT_EQ(kRedImageColor, GetAverageBackgroundColor());
414 } 410 }
415 411
416 } // namespace chromeos 412 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698