| 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/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.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" |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 // FileSystemExtensionApiTestBase override. | 522 // FileSystemExtensionApiTestBase override. |
| 523 void TearDown() override { | 523 void TearDown() override { |
| 524 FileSystemExtensionApiTestBase::TearDown(); | 524 FileSystemExtensionApiTestBase::TearDown(); |
| 525 ui::SelectFileDialog::SetFactory(NULL); | 525 ui::SelectFileDialog::SetFactory(NULL); |
| 526 } | 526 } |
| 527 | 527 |
| 528 protected: | 528 protected: |
| 529 // DriveIntegrationService factory function for this test. | 529 // DriveIntegrationService factory function for this test. |
| 530 drive::DriveIntegrationService* CreateDriveIntegrationService( | 530 drive::DriveIntegrationService* CreateDriveIntegrationService( |
| 531 Profile* profile) { | 531 Profile* profile) { |
| 532 // Ignore signin profile. |
| 533 if (profile->GetPath() == chromeos::ProfileHelper::GetSigninProfileDir()) |
| 534 return NULL; |
| 535 |
| 536 // DriveFileSystemExtensionApiTest doesn't expect that several user profiles |
| 537 // could exist simultaneously. |
| 538 CHECK(fake_drive_service_ == NULL); |
| 532 fake_drive_service_ = new drive::FakeDriveService; | 539 fake_drive_service_ = new drive::FakeDriveService; |
| 533 fake_drive_service_->LoadAppListForDriveApi("drive/applist.json"); | 540 fake_drive_service_->LoadAppListForDriveApi("drive/applist.json"); |
| 534 | 541 |
| 535 std::map<std::string, std::string> resource_ids; | 542 std::map<std::string, std::string> resource_ids; |
| 536 EXPECT_TRUE(InitializeDriveService(fake_drive_service_, &resource_ids)); | 543 EXPECT_TRUE(InitializeDriveService(fake_drive_service_, &resource_ids)); |
| 537 | 544 |
| 538 return new drive::DriveIntegrationService( | 545 return new drive::DriveIntegrationService( |
| 539 profile, NULL, fake_drive_service_, "", test_cache_root_.path(), NULL); | 546 profile, NULL, fake_drive_service_, "", test_cache_root_.path(), NULL); |
| 540 } | 547 } |
| 541 | 548 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 AppFileHandlerMulti) { | 850 AppFileHandlerMulti) { |
| 844 EXPECT_TRUE( | 851 EXPECT_TRUE( |
| 845 RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi", | 852 RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi", |
| 846 FILE_PATH_LITERAL("manifest.json"), | 853 FILE_PATH_LITERAL("manifest.json"), |
| 847 "", | 854 "", |
| 848 FLAGS_NONE)) | 855 FLAGS_NONE)) |
| 849 << message_; | 856 << message_; |
| 850 } | 857 } |
| 851 } // namespace | 858 } // namespace |
| 852 } // namespace file_manager | 859 } // namespace file_manager |
| OLD | NEW |