OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/chromeos/drive/drive_integration_service.h" | 11 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
12 #include "chrome/browser/chromeos/file_manager/drive_test_util.h" | 12 #include "chrome/browser/chromeos/file_manager/drive_test_util.h" |
13 #include "chrome/browser/chromeos/file_manager/volume_manager.h" | 13 #include "chrome/browser/chromeos/file_manager/volume_manager.h" |
14 #include "chrome/browser/chromeos/login/users/user_manager.h" | |
15 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 14 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
16 #include "chrome/browser/drive/fake_drive_service.h" | 15 #include "chrome/browser/drive/fake_drive_service.h" |
17 #include "chrome/browser/extensions/extension_apitest.h" | 16 #include "chrome/browser/extensions/extension_apitest.h" |
18 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
20 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
21 #include "chrome/common/chrome_constants.h" | 20 #include "chrome/common/chrome_constants.h" |
22 #include "chrome/common/chrome_paths.h" | 21 #include "chrome/common/chrome_paths.h" |
| 22 #include "components/user_manager/user_manager.h" |
23 #include "content/public/browser/browser_context.h" | 23 #include "content/public/browser/browser_context.h" |
24 #include "content/public/browser/notification_service.h" | 24 #include "content/public/browser/notification_service.h" |
25 #include "content/public/test/test_utils.h" | 25 #include "content/public/test/test_utils.h" |
26 #include "extensions/browser/notification_types.h" | 26 #include "extensions/browser/notification_types.h" |
27 #include "google_apis/drive/drive_api_parser.h" | 27 #include "google_apis/drive/drive_api_parser.h" |
28 #include "google_apis/drive/test_util.h" | 28 #include "google_apis/drive/test_util.h" |
29 #include "google_apis/drive/time_util.h" | 29 #include "google_apis/drive/time_util.h" |
30 #include "webkit/browser/fileapi/external_mount_points.h" | 30 #include "webkit/browser/fileapi/external_mount_points.h" |
31 | 31 |
32 // Tests for access to external file systems (as defined in | 32 // Tests for access to external file systems (as defined in |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 | 504 |
505 // Tests for Drive file systems in multi-profile setting. | 505 // Tests for Drive file systems in multi-profile setting. |
506 class MultiProfileDriveFileSystemExtensionApiTest : | 506 class MultiProfileDriveFileSystemExtensionApiTest : |
507 public FileSystemExtensionApiTestBase { | 507 public FileSystemExtensionApiTestBase { |
508 public: | 508 public: |
509 MultiProfileDriveFileSystemExtensionApiTest() : second_profile(NULL) {} | 509 MultiProfileDriveFileSystemExtensionApiTest() : second_profile(NULL) {} |
510 | 510 |
511 virtual void SetUpOnMainThread() OVERRIDE { | 511 virtual void SetUpOnMainThread() OVERRIDE { |
512 base::FilePath user_data_directory; | 512 base::FilePath user_data_directory; |
513 PathService::Get(chrome::DIR_USER_DATA, &user_data_directory); | 513 PathService::Get(chrome::DIR_USER_DATA, &user_data_directory); |
514 chromeos::UserManager::Get()->UserLoggedIn(kSecondProfileAccount, | 514 user_manager::UserManager::Get()->UserLoggedIn( |
515 kSecondProfileHash, | 515 kSecondProfileAccount, kSecondProfileHash, false); |
516 false); | |
517 // Set up the secondary profile. | 516 // Set up the secondary profile. |
518 base::FilePath profile_dir = | 517 base::FilePath profile_dir = |
519 user_data_directory.Append( | 518 user_data_directory.Append( |
520 chromeos::ProfileHelper::GetUserProfileDir( | 519 chromeos::ProfileHelper::GetUserProfileDir( |
521 kSecondProfileHash).BaseName()); | 520 kSecondProfileHash).BaseName()); |
522 second_profile = | 521 second_profile = |
523 g_browser_process->profile_manager()->GetProfile(profile_dir); | 522 g_browser_process->profile_manager()->GetProfile(profile_dir); |
524 | 523 |
525 FileSystemExtensionApiTestBase::SetUpOnMainThread(); | 524 FileSystemExtensionApiTestBase::SetUpOnMainThread(); |
526 } | 525 } |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 AppFileHandlerMulti) { | 789 AppFileHandlerMulti) { |
791 EXPECT_TRUE( | 790 EXPECT_TRUE( |
792 RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi", | 791 RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi", |
793 FILE_PATH_LITERAL("manifest.json"), | 792 FILE_PATH_LITERAL("manifest.json"), |
794 "", | 793 "", |
795 FLAGS_NONE)) | 794 FLAGS_NONE)) |
796 << message_; | 795 << message_; |
797 } | 796 } |
798 } // namespace | 797 } // namespace |
799 } // namespace file_manager | 798 } // namespace file_manager |
OLD | NEW |