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 "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/chromeos/drive/drive_integration_service.h" | 10 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 // Tests for a drive file system. | 286 // Tests for a drive file system. |
287 class DriveFileSystemExtensionApiTest : public FileSystemExtensionApiTestBase { | 287 class DriveFileSystemExtensionApiTest : public FileSystemExtensionApiTestBase { |
288 public: | 288 public: |
289 DriveFileSystemExtensionApiTest() : fake_drive_service_(NULL) {} | 289 DriveFileSystemExtensionApiTest() : fake_drive_service_(NULL) {} |
290 virtual ~DriveFileSystemExtensionApiTest() {} | 290 virtual ~DriveFileSystemExtensionApiTest() {} |
291 | 291 |
292 // FileSystemExtensionApiTestBase OVERRIDE. | 292 // FileSystemExtensionApiTestBase OVERRIDE. |
293 virtual void InitTestFileSystem() OVERRIDE { | 293 virtual void InitTestFileSystem() OVERRIDE { |
294 // Set up cache root to be used by DriveIntegrationService. This has to be | 294 // Set up cache root to be used by DriveIntegrationService. This has to be |
295 // done before the browser is created because the service instance is | 295 // done before the browser is created because the service instance is |
296 // initialized by FileManagerEventRouter. | 296 // initialized by EventRouter. |
297 ASSERT_TRUE(test_cache_root_.CreateUniqueTempDir()); | 297 ASSERT_TRUE(test_cache_root_.CreateUniqueTempDir()); |
298 | 298 |
299 drive::DriveIntegrationServiceFactory::SetFactoryForTest( | 299 drive::DriveIntegrationServiceFactory::SetFactoryForTest( |
300 base::Bind( | 300 base::Bind( |
301 &DriveFileSystemExtensionApiTest::CreateDriveIntegrationService, | 301 &DriveFileSystemExtensionApiTest::CreateDriveIntegrationService, |
302 base::Unretained(this))); | 302 base::Unretained(this))); |
303 } | 303 } |
304 | 304 |
305 // FileSystemExtensionApiTestBase OVERRIDE. | 305 // FileSystemExtensionApiTestBase OVERRIDE. |
306 virtual void AddTestMountPoint() OVERRIDE { | 306 virtual void AddTestMountPoint() OVERRIDE { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 fake_drive_service_->set_default_max_results(1); | 426 fake_drive_service_->set_default_max_results(1); |
427 EXPECT_TRUE(RunFileSystemExtensionApiTest( | 427 EXPECT_TRUE(RunFileSystemExtensionApiTest( |
428 "file_browser/handler_test_runner", | 428 "file_browser/handler_test_runner", |
429 FILE_PATH_LITERAL("manifest.json"), | 429 FILE_PATH_LITERAL("manifest.json"), |
430 "file_browser/app_file_handler", | 430 "file_browser/app_file_handler", |
431 FLAGS_USE_FILE_HANDLER)) << message_; | 431 FLAGS_USE_FILE_HANDLER)) << message_; |
432 } | 432 } |
433 | 433 |
434 } // namespace | 434 } // namespace |
435 } // namespace file_manager | 435 } // namespace file_manager |
OLD | NEW |