| 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/json/json_file_value_serializer.h" | 9 #include "base/json/json_file_value_serializer.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 class DriveFileSystemExtensionApiTest : public FileSystemExtensionApiTestBase { | 316 class DriveFileSystemExtensionApiTest : public FileSystemExtensionApiTestBase { |
| 317 public: | 317 public: |
| 318 DriveFileSystemExtensionApiTest() : fake_drive_service_(NULL) {} | 318 DriveFileSystemExtensionApiTest() : fake_drive_service_(NULL) {} |
| 319 virtual ~DriveFileSystemExtensionApiTest() {} | 319 virtual ~DriveFileSystemExtensionApiTest() {} |
| 320 | 320 |
| 321 // FileSystemExtensionApiTestBase OVERRIDE. | 321 // FileSystemExtensionApiTestBase OVERRIDE. |
| 322 virtual void InitTestFileSystem() OVERRIDE { | 322 virtual void InitTestFileSystem() OVERRIDE { |
| 323 // Set up cache root and documents service to be used when creating gdata | 323 // Set up cache root and documents service to be used when creating gdata |
| 324 // system service. This has to be done early on (before the browser is | 324 // system service. This has to be done early on (before the browser is |
| 325 // created) because the system service instance is initialized very early | 325 // created) because the system service instance is initialized very early |
| 326 // by FileBrowserEventRouter. | 326 // by FileManagerEventRouter. |
| 327 base::FilePath tmp_dir_path; | 327 base::FilePath tmp_dir_path; |
| 328 PathService::Get(base::DIR_TEMP, &tmp_dir_path); | 328 PathService::Get(base::DIR_TEMP, &tmp_dir_path); |
| 329 ASSERT_TRUE(test_cache_root_.CreateUniqueTempDirUnderPath(tmp_dir_path)); | 329 ASSERT_TRUE(test_cache_root_.CreateUniqueTempDirUnderPath(tmp_dir_path)); |
| 330 | 330 |
| 331 drive::DriveSystemServiceFactory::SetFactoryForTest( | 331 drive::DriveSystemServiceFactory::SetFactoryForTest( |
| 332 base::Bind(&DriveFileSystemExtensionApiTest::CreateDriveSystemService, | 332 base::Bind(&DriveFileSystemExtensionApiTest::CreateDriveSystemService, |
| 333 base::Unretained(this))); | 333 base::Unretained(this))); |
| 334 } | 334 } |
| 335 | 335 |
| 336 // FileSystemExtensionApiTestBase OVERRIDE. | 336 // FileSystemExtensionApiTestBase OVERRIDE. |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 IN_PROC_BROWSER_TEST_F(DriveFileSystemExtensionApiTest, AppFileHandler) { | 517 IN_PROC_BROWSER_TEST_F(DriveFileSystemExtensionApiTest, AppFileHandler) { |
| 518 fake_drive_service_->set_default_max_results(1); | 518 fake_drive_service_->set_default_max_results(1); |
| 519 EXPECT_TRUE(RunFileSystemExtensionApiTest( | 519 EXPECT_TRUE(RunFileSystemExtensionApiTest( |
| 520 "file_browser/handler_test_runner", | 520 "file_browser/handler_test_runner", |
| 521 FILE_PATH_LITERAL("manifest_v2.json"), | 521 FILE_PATH_LITERAL("manifest_v2.json"), |
| 522 "file_browser/app_file_handler", | 522 "file_browser/app_file_handler", |
| 523 FLAGS_USE_FILE_HANDLER)) << message_; | 523 FLAGS_USE_FILE_HANDLER)) << message_; |
| 524 } | 524 } |
| 525 | 525 |
| 526 } // namespace | 526 } // namespace |
| OLD | NEW |