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

Unified Diff: chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc

Issue 11411280: Sync FileSystem: Use app id part of the URL for its directory title. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 years, 1 month 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
Index: chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc
diff --git a/chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc b/chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc
index f451ce81550cbfc603cb83d7c00f1c9558bcadc2..21bc8f53d881945794d7b7d6d20ca7b2ee40e190 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc
@@ -386,8 +386,8 @@ TEST_F(DriveFileSyncServiceTest, GetSyncRoot) {
}
TEST_F(DriveFileSyncServiceTest, BatchSyncOnInitialization) {
- const GURL kOrigin1("http://example.com");
- const GURL kOrigin2("http://hoge.example.com");
+ const GURL kOrigin1("chrome-extension://example.com");
+ const GURL kOrigin2("chrome-extension://hoge.example.com");
kinuko 2012/11/30 07:13:28 could we also replace the host part with more plau
tzik 2012/12/03 08:12:08 Done.
const std::string kDirectoryResourceId1(
"folder:origin_directory_resource_id");
const std::string kDirectoryResourceId2(
@@ -439,7 +439,7 @@ TEST_F(DriveFileSyncServiceTest, BatchSyncOnInitialization) {
}
TEST_F(DriveFileSyncServiceTest, RegisterNewOrigin) {
- const GURL kOrigin("http://example.com");
+ const GURL kOrigin("chrome-extension://example.com");
const std::string kDirectoryResourceId("folder:origin_directory_resource_id");
const std::string kSyncRootResourceId("folder:sync_root_resource_id");
const GURL kSyncRootContentURL("https://sync_root_content_url/");
@@ -456,7 +456,8 @@ TEST_F(DriveFileSyncServiceTest, RegisterNewOrigin) {
scoped_ptr<Value> origin_directory_not_found(LoadJSONFile(
"sync_file_system/origin_directory_not_found.json"));
- std::string query = FormatTitleQuery(kOrigin.spec());
+ std::string query = FormatTitleQuery(
+ DriveFileSyncClient::OriginToDirectoryTitle(kOrigin));
EXPECT_CALL(*mock_drive_service(),
GetDocuments(GURL(), 0, query, false, kSyncRootResourceId, _))
@@ -481,8 +482,8 @@ TEST_F(DriveFileSyncServiceTest, RegisterNewOrigin) {
scoped_ptr<Value> origin_directory_created(LoadJSONFile(
"sync_file_system/origin_directory_created.json"));
- FilePath::StringType dirname =
- FilePath().AppendASCII(kOrigin.spec()).value();
+ FilePath::StringType dirname = FilePath().AppendASCII(
+ DriveFileSyncClient::OriginToDirectoryTitle(kOrigin)).value();
EXPECT_CALL(*mock_drive_service(),
AddNewDirectory(kSyncRootContentURL, dirname, _))
.WillOnce(InvokeGetDataCallback2(
@@ -520,7 +521,7 @@ TEST_F(DriveFileSyncServiceTest, RegisterNewOrigin) {
}
TEST_F(DriveFileSyncServiceTest, RegisterExistingOrigin) {
- const GURL kOrigin("http://example.com");
+ const GURL kOrigin("chrome-extension://example.com");
const std::string kDirectoryResourceId("folder:origin_directory_resource_id");
const std::string kSyncRootResourceId("folder:sync_root_resource_id");
@@ -536,7 +537,8 @@ TEST_F(DriveFileSyncServiceTest, RegisterExistingOrigin) {
scoped_ptr<Value> origin_directory_found(LoadJSONFile(
"sync_file_system/origin_directory_found.json"));
- std::string query = FormatTitleQuery("http://example.com/");
+ std::string query = FormatTitleQuery(
+ DriveFileSyncClient::OriginToDirectoryTitle(kOrigin));
EXPECT_CALL(*mock_drive_service(),
GetDocuments(GURL(), 0, query, false, kSyncRootResourceId, _))
.WillOnce(InvokeGetDataCallback5(
@@ -636,7 +638,7 @@ TEST_F(DriveFileSyncServiceTest, UnregisterOrigin) {
TEST_F(DriveFileSyncServiceTest, ResolveSyncOperationType) {
const fileapi::FileSystemURL url = fileapi::CreateSyncableFileSystemURL(
- GURL("http://example.com/"),
+ GURL("chrome-extension://example.com/"),
DriveFileSyncService::kServiceName,
FilePath().AppendASCII("path/to/file"));
const std::string kResourceId("123456");

Powered by Google App Engine
This is Rietveld 408576698