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

Side by Side Diff: chrome/browser/chromeos/file_manager/file_manager_browsertest.cc

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // Browser test for basic Chrome OS file manager functionality: 5 // Browser test for basic Chrome OS file manager functionality:
6 // - The file list is updated when a file is added externally to the Downloads 6 // - The file list is updated when a file is added externally to the Downloads
7 // folder. 7 // folder.
8 // - Selecting a file and copy-pasting it with the keyboard copies the file. 8 // - Selecting a file and copy-pasting it with the keyboard copies the file.
9 // - Selecting a file and pressing delete deletes it. 9 // - Selecting a file and pressing delete deletes it.
10 10
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 Profile* const profile = chromeos::ProfileHelper::GetProfileByUserIdHash( 1141 Profile* const profile = chromeos::ProfileHelper::GetProfileByUserIdHash(
1142 kTestAccounts[PRIMARY_ACCOUNT_INDEX].hash); 1142 kTestAccounts[PRIMARY_ACCOUNT_INDEX].hash);
1143 return profile ? profile : FileManagerBrowserTestBase::profile(); 1143 return profile ? profile : FileManagerBrowserTestBase::profile();
1144 } 1144 }
1145 1145
1146 // Sets the test case name (used as a function name in test_cases.js to call.) 1146 // Sets the test case name (used as a function name in test_cases.js to call.)
1147 void set_test_case_name(const std::string& name) { test_case_name_ = name; } 1147 void set_test_case_name(const std::string& name) { test_case_name_ = name; }
1148 1148
1149 // Adds a new user for testing to the current session. 1149 // Adds a new user for testing to the current session.
1150 void AddUser(const TestAccountInfo& info, bool log_in) { 1150 void AddUser(const TestAccountInfo& info, bool log_in) {
1151 chromeos::UserManager* const user_manager = chromeos::UserManager::Get(); 1151 chromeos::UserManager* const user_manager = chromeos::GetUserManager();
1152 if (log_in) 1152 if (log_in)
1153 user_manager->UserLoggedIn(info.email, info.hash, false); 1153 user_manager->UserLoggedIn(info.email, info.hash, false);
1154 user_manager->SaveUserDisplayName(info.email, 1154 user_manager->SaveUserDisplayName(info.email,
1155 base::UTF8ToUTF16(info.display_name)); 1155 base::UTF8ToUTF16(info.display_name));
1156 chromeos::ProfileHelper::GetProfileByUserIdHash(info.hash)->GetPrefs()-> 1156 chromeos::ProfileHelper::GetProfileByUserIdHash(info.hash)->GetPrefs()->
1157 SetString(prefs::kGoogleServicesUsername, info.email); 1157 SetString(prefs::kGoogleServicesUsername, info.email);
1158 } 1158 }
1159 1159
1160 private: 1160 private:
1161 virtual GuestMode GetGuestModeParam() const OVERRIDE { 1161 virtual GuestMode GetGuestModeParam() const OVERRIDE {
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 } 1469 }
1470 1470
1471 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, ExposureImageOnDrive) { 1471 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, ExposureImageOnDrive) {
1472 AddScript("gallery/photo_editor.js"); 1472 AddScript("gallery/photo_editor.js");
1473 set_test_case_name("exposureImageOnDrive"); 1473 set_test_case_name("exposureImageOnDrive");
1474 StartTest(); 1474 StartTest();
1475 } 1475 }
1476 1476
1477 } // namespace 1477 } // namespace
1478 } // namespace file_manager 1478 } // namespace file_manager
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc ('k') | chrome/browser/chromeos/file_manager/path_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698