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

Side by Side Diff: chrome/browser/extensions/api/file_system/file_system_apitest_chromeos.cc

Issue 1425093004: Revert of This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Created 5 years, 1 month 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 "chrome/browser/extensions/api/file_system/file_system_api.h" 5 #include "chrome/browser/extensions/api/file_system/file_system_api.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 mount_point_path, file_manager::VOLUME_TYPE_TESTING, 258 mount_point_path, file_manager::VOLUME_TYPE_TESTING,
259 chromeos::DEVICE_TYPE_UNKNOWN, read_only); 259 chromeos::DEVICE_TYPE_UNKNOWN, read_only);
260 } 260 }
261 261
262 // Simulates entering the kiosk session. 262 // Simulates entering the kiosk session.
263 void EnterKioskSession() { 263 void EnterKioskSession() {
264 fake_user_manager_ = new chromeos::FakeChromeUserManager(); 264 fake_user_manager_ = new chromeos::FakeChromeUserManager();
265 user_manager_enabler_.reset( 265 user_manager_enabler_.reset(
266 new chromeos::ScopedUserManagerEnabler(fake_user_manager_)); 266 new chromeos::ScopedUserManagerEnabler(fake_user_manager_));
267 267
268 const AccountId kiosk_app_account_id = 268 const std::string kKioskLogin = "kiosk@foobar.com";
269 AccountId::FromUserEmail("kiosk@foobar.com"); 269 fake_user_manager_->AddKioskAppUser(kKioskLogin);
270 fake_user_manager_->AddKioskAppUser(kiosk_app_account_id); 270 fake_user_manager_->LoginUser(kKioskLogin);
271 fake_user_manager_->LoginUser(kiosk_app_account_id);
272 } 271 }
273 }; 272 };
274 273
275 IN_PROC_BROWSER_TEST_F(FileSystemApiTestForDrive, 274 IN_PROC_BROWSER_TEST_F(FileSystemApiTestForDrive,
276 FileSystemApiOpenExistingFileTest) { 275 FileSystemApiOpenExistingFileTest) {
277 base::FilePath test_file = drive::util::GetDriveMountPointPath( 276 base::FilePath test_file = drive::util::GetDriveMountPointPath(
278 browser()->profile()).AppendASCII("root/open_existing.txt"); 277 browser()->profile()).AppendASCII("root/open_existing.txt");
279 FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest( 278 FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
280 &test_file); 279 &test_file);
281 ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/open_existing")) 280 ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/open_existing"))
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 profile(), extensions::api::file_system::OnVolumeListChanged::kEventName, 491 profile(), extensions::api::file_system::OnVolumeListChanged::kEventName,
493 kTestingExtensionId, 492 kTestingExtensionId,
494 base::Bind(&FileSystemApiTestForRequestFileSystem::MountFakeVolume, 493 base::Bind(&FileSystemApiTestForRequestFileSystem::MountFakeVolume,
495 this)); 494 this));
496 495
497 ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/on_volume_list_changed")) 496 ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/on_volume_list_changed"))
498 << message_; 497 << message_;
499 } 498 }
500 499
501 } // namespace extensions 500 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698