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

Unified Diff: chrome/browser/chromeos/extensions/external_filesystem_apitest.cc

Issue 10828385: Rename DocumentsServiceInterface to DriveServiceInterface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unnecessary includes. Created 8 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_browser_event_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
diff --git a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
index 6639465725966bccf9d20156bcd27b61169ab05e..bd292b628f3477d263d393095b2215d1f12ee6a7 100644
--- a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
+++ b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
@@ -18,7 +18,7 @@
#include "chrome/browser/chromeos/gdata/gdata_system_service.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
#include "chrome/browser/chromeos/gdata/gdata_wapi_parser.h"
-#include "chrome/browser/chromeos/gdata/mock_documents_service.h"
+#include "chrome/browser/chromeos/gdata/mock_drive_service.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_test_message_listener.h"
#include "chrome/browser/profiles/profile.h"
@@ -204,31 +204,31 @@ class RemoteFileSystemExtensionApiTest : public ExtensionApiTest {
gdata::GDataSystemServiceFactory::set_cache_root_for_test(
test_cache_root_.path().value());
- mock_documents_service_ = new gdata::MockDocumentsService();
+ mock_drive_service_ = new gdata::MockDriveService();
operation_registry_.reset(new gdata::GDataOperationRegistry());
// FileBrowserEventRouter will add and remove itself from operation registry
// observer list.
- EXPECT_CALL(*mock_documents_service_, operation_registry()).
+ EXPECT_CALL(*mock_drive_service_, operation_registry()).
WillRepeatedly(Return(operation_registry_.get()));
- // |mock_documents_service_| will eventually get owned by a system service.
- gdata::GDataSystemServiceFactory::set_documents_service_for_test(
- mock_documents_service_);
+ // |mock_drive_service_| will eventually get owned by a system service.
+ gdata::GDataSystemServiceFactory::set_drive_service_for_test(
+ mock_drive_service_);
ExtensionApiTest::SetUp();
}
virtual void TearDown() OVERRIDE {
// Let's make sure we don't leak documents service.
- gdata::GDataSystemServiceFactory::set_documents_service_for_test(NULL);
+ gdata::GDataSystemServiceFactory::set_drive_service_for_test(NULL);
gdata::GDataSystemServiceFactory::set_cache_root_for_test(std::string());
ExtensionApiTest::TearDown();
}
protected:
ScopedTempDir test_cache_root_;
- gdata::MockDocumentsService* mock_documents_service_;
+ gdata::MockDriveService* mock_drive_service_;
scoped_ptr<gdata::GDataOperationRegistry> operation_registry_;
};
@@ -278,18 +278,18 @@ IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest,
IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest,
RemoteMountPoint) {
- EXPECT_CALL(*mock_documents_service_, GetAccountMetadata(_)).Times(1);
+ EXPECT_CALL(*mock_drive_service_, GetAccountMetadata(_)).Times(1);
// First, file browser will try to create new directory.
scoped_ptr<base::Value> dir_value(LoadJSONFile(kTestDirectory));
- EXPECT_CALL(*mock_documents_service_,
+ EXPECT_CALL(*mock_drive_service_,
CreateDirectory(_, _, _))
.WillOnce(MockCreateDirectoryCallback(gdata::HTTP_SUCCESS, &dir_value));
// Then the test will try to read an existing file file.
// Remote filesystem should first request root feed from gdata server.
scoped_ptr<base::Value> documents_value(LoadJSONFile(kTestRootFeed));
- EXPECT_CALL(*mock_documents_service_,
+ EXPECT_CALL(*mock_drive_service_,
GetDocuments(_, _, _, _, _))
.WillOnce(MockGetDocumentsCallback(gdata::HTTP_SUCCESS,
&documents_value));
@@ -303,20 +303,20 @@ IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest,
// copy is already present in the cache.
scoped_ptr<base::Value> document_to_download_value(
LoadJSONFile(kTestDocumentToDownloadEntry));
- EXPECT_CALL(*mock_documents_service_,
+ EXPECT_CALL(*mock_drive_service_,
GetDocumentEntry("file:1_file_resource_id", _))
.WillOnce(MockGetDocumentEntryCallback(gdata::HTTP_SUCCESS,
&document_to_download_value));
// We expect to download url defined in document entry returned by
// GetDocumentEntry mock implementation.
- EXPECT_CALL(*mock_documents_service_,
+ EXPECT_CALL(*mock_drive_service_,
DownloadFile(_, _, GURL("https://file_content_url_changed"),
_, _))
.WillOnce(MockDownloadFileCallback(gdata::HTTP_SUCCESS));
// On exit, all operations in progress should be cancelled.
- EXPECT_CALL(*mock_documents_service_, CancelAll());
+ EXPECT_CALL(*mock_drive_service_, CancelAll());
// All is set... RUN THE TEST.
EXPECT_TRUE(RunExtensionTest("filesystem_handler")) << message_;
@@ -325,18 +325,18 @@ IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest,
}
IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest, ContentSearch) {
- EXPECT_CALL(*mock_documents_service_, GetAccountMetadata(_)).Times(1);
+ EXPECT_CALL(*mock_drive_service_, GetAccountMetadata(_)).Times(1);
// First, test will get drive root directory, to init file system.
scoped_ptr<base::Value> documents_value(LoadJSONFile(kTestRootFeed));
- EXPECT_CALL(*mock_documents_service_,
+ EXPECT_CALL(*mock_drive_service_,
GetDocuments(_, _, "", _, _))
.WillOnce(MockGetDocumentsCallback(gdata::HTTP_SUCCESS,
&documents_value));
// We return the whole test file system in serch results.
scoped_ptr<base::Value> search_value(LoadJSONFile(kTestRootFeed));
- EXPECT_CALL(*mock_documents_service_,
+ EXPECT_CALL(*mock_drive_service_,
GetDocuments(_, _, "foo", _, _))
.WillOnce(MockGetDocumentsCallback(gdata::HTTP_SUCCESS,
&search_value));
@@ -344,20 +344,20 @@ IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest, ContentSearch) {
// Test will try to create a snapshot of the returned file.
scoped_ptr<base::Value> document_to_download_value(
LoadJSONFile(kTestDocumentToDownloadEntry));
- EXPECT_CALL(*mock_documents_service_,
+ EXPECT_CALL(*mock_drive_service_,
GetDocumentEntry("file:1_file_resource_id", _))
.WillOnce(MockGetDocumentEntryCallback(gdata::HTTP_SUCCESS,
&document_to_download_value));
// We expect to download url defined in document entry returned by
// GetDocumentEntry mock implementation.
- EXPECT_CALL(*mock_documents_service_,
+ EXPECT_CALL(*mock_drive_service_,
DownloadFile(_, _, GURL("https://file_content_url_changed"),
_, _))
.WillOnce(MockDownloadFileCallback(gdata::HTTP_SUCCESS));
// On exit, all operations in progress should be cancelled.
- EXPECT_CALL(*mock_documents_service_, CancelAll());
+ EXPECT_CALL(*mock_drive_service_, CancelAll());
// All is set... RUN THE TEST.
EXPECT_TRUE(RunExtensionSubtest("filebrowser_component", "remote_search.html",
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_browser_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698