OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |