summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkeishi@chromium.org <keishi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-08 14:12:38 +0000
committerkeishi@chromium.org <keishi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-08 14:12:38 +0000
commit3ac6b8fc372273274f2f219af304dde3f4df2ec6 (patch)
treec5d97b9fad3b858dac705025b1ef9148087f6944
parentf9461a945da6fb2d47c89b64ca4eb7d6c1dcf68a (diff)
downloadchromium_src-3ac6b8fc372273274f2f219af304dde3f4df2ec6.zip
chromium_src-3ac6b8fc372273274f2f219af304dde3f4df2ec6.tar.gz
chromium_src-3ac6b8fc372273274f2f219af304dde3f4df2ec6.tar.bz2
Changing GetTestFilePath so we can place test files outside of the chromeos directory.
BUG=176884 Review URL: https://chromiumcodereview.appspot.com/12462010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186958 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/contacts/gdata_contacts_service_unittest.cc5
-rw-r--r--chrome/browser/chromeos/cros/network_library_unittest.cc40
-rw-r--r--chrome/browser/chromeos/drive/drive_cache_unittest.cc45
-rw-r--r--chrome/browser/chromeos/drive/drive_file_system_unittest.cc157
-rw-r--r--chrome/browser/chromeos/drive/drive_scheduler_unittest.cc6
-rw-r--r--chrome/browser/chromeos/drive/drive_webapps_registry_unittest.cc5
-rw-r--r--chrome/browser/chromeos/drive/file_system/create_directory_operation_unittest.cc9
-rw-r--r--chrome/browser/chromeos/drive/resource_entry_conversion_unittest.cc10
-rw-r--r--chrome/browser/chromeos/drive/search_metadata_unittest.cc2
-rw-r--r--chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc8
-rw-r--r--chrome/browser/chromeos/extensions/external_filesystem_apitest.cc7
-rw-r--r--chrome/browser/chromeos/net/onc_utils_unittest.cc13
-rw-r--r--chrome/browser/google_apis/base_operations_server_unittest.cc11
-rw-r--r--chrome/browser/google_apis/drive_api_operations_unittest.cc21
-rw-r--r--chrome/browser/google_apis/drive_api_parser_unittest.cc11
-rw-r--r--chrome/browser/google_apis/fake_drive_service_unittest.cc172
-rw-r--r--chrome/browser/google_apis/gdata_wapi_operations_unittest.cc39
-rw-r--r--chrome/browser/google_apis/gdata_wapi_parser_unittest.cc6
-rw-r--r--chrome/browser/google_apis/test_util.cc1
-rw-r--r--chrome/browser/google_apis/test_util.h4
-rw-r--r--chrome/browser/sync_file_system/drive_file_sync_client_unittest.cc81
-rw-r--r--chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc32
22 files changed, 388 insertions, 297 deletions
diff --git a/chrome/browser/chromeos/contacts/gdata_contacts_service_unittest.cc b/chrome/browser/chromeos/contacts/gdata_contacts_service_unittest.cc
index 38bead4..49a36dd 100644
--- a/chrome/browser/chromeos/contacts/gdata_contacts_service_unittest.cc
+++ b/chrome/browser/chromeos/contacts/gdata_contacts_service_unittest.cc
@@ -36,9 +36,6 @@ namespace {
const char kTestGDataAuthToken[] = "testtoken";
-// Base URL where feeds are located on the test server.
-const char kFeedBaseUrl[] = "gdata/contacts";
-
// Filename of JSON feed containing contact groups.
const char kGroupsFeedFilename[] = "/groups.json";
@@ -171,7 +168,7 @@ class GDataContactsServiceTest : public testing::Test {
scoped_ptr<google_apis::test_server::HttpResponse> result =
google_apis::test_util::CreateHttpResponseFromFile(
google_apis::test_util::GetTestFilePath(
- std::string(kFeedBaseUrl) + request.relative_url));
+ std::string("chromeos/gdata/contacts") + request.relative_url));
return result.Pass();
}
diff --git a/chrome/browser/chromeos/cros/network_library_unittest.cc b/chrome/browser/chromeos/cros/network_library_unittest.cc
index 6099511..aab1040 100644
--- a/chrome/browser/chromeos/cros/network_library_unittest.cc
+++ b/chrome/browser/chromeos/cros/network_library_unittest.cc
@@ -389,7 +389,7 @@ TEST_F(NetworkLibraryStubTest, NetworkConnectVPN) {
TEST_F(NetworkLibraryStubTest, LoadOncNetworksWithInvalidConfig) {
LoadOncAndVerifyNetworks(
"toplevel_partially_invalid.onc",
- "net/shill_for_toplevel_partially_invalid.json",
+ "chromeos/net/shill_for_toplevel_partially_invalid.json",
onc::ONC_SOURCE_USER_POLICY,
false /* expect import to fail */);
@@ -402,7 +402,7 @@ struct ImportParams {
// |onc_file|: Filename of source ONC, relative to
// chromeos/test/data/network.
// |shill_file|: Filename of expected Shill config, relative to
- // chrome/test/data/chromeos).
+ // chrome/test/data).
// |onc_source|: The source of the ONC.
// |expect_import_result|: The expected return value of LoadOncNetworks.
ImportParams(const std::string& onc_file,
@@ -454,42 +454,44 @@ INSTANTIATE_TEST_CASE_P(
LoadOncNetworksTest,
::testing::Values(
ImportParams("managed_toplevel1.onc",
- "net/shill_for_managed_toplevel1.json",
+ "chromeos/net/shill_for_managed_toplevel1.json",
onc::ONC_SOURCE_USER_POLICY),
ImportParams("managed_toplevel2.onc",
- "net/shill_for_managed_toplevel2.json",
+ "chromeos/net/shill_for_managed_toplevel2.json",
onc::ONC_SOURCE_USER_POLICY),
ImportParams("managed_toplevel_l2tpipsec.onc",
- "net/shill_for_managed_toplevel_l2tpipsec.json",
+ "chromeos/net/shill_for_managed_toplevel_l2tpipsec.json",
onc::ONC_SOURCE_USER_POLICY),
ImportParams("managed_toplevel_wifi_peap.onc",
- "net/shill_for_managed_toplevel_wifi_peap.json",
+ "chromeos/net/shill_for_managed_toplevel_wifi_peap.json",
onc::ONC_SOURCE_DEVICE_POLICY),
ImportParams("toplevel_wifi_open.onc",
- "net/shill_for_toplevel_wifi_open.json",
+ "chromeos/net/shill_for_toplevel_wifi_open.json",
onc::ONC_SOURCE_DEVICE_POLICY),
ImportParams("toplevel_wifi_wep_proxy.onc",
- "net/shill_for_toplevel_wifi_wep_proxy.json",
+ "chromeos/net/shill_for_toplevel_wifi_wep_proxy.json",
onc::ONC_SOURCE_USER_POLICY),
ImportParams("toplevel_wifi_wpa_psk.onc",
- "net/shill_for_toplevel_wifi_wpa_psk.json",
+ "chromeos/net/shill_for_toplevel_wifi_wpa_psk.json",
onc::ONC_SOURCE_USER_POLICY),
ImportParams("toplevel_wifi_leap.onc",
- "net/shill_for_toplevel_wifi_leap.json",
- onc::ONC_SOURCE_USER_POLICY),
- ImportParams("toplevel_wifi_eap_clientcert.onc",
- "net/shill_for_toplevel_wifi_eap_clientcert.json",
+ "chromeos/net/shill_for_toplevel_wifi_leap.json",
onc::ONC_SOURCE_USER_POLICY),
+ ImportParams(
+ "toplevel_wifi_eap_clientcert.onc",
+ "chromeos/net/shill_for_toplevel_wifi_eap_clientcert.json",
+ onc::ONC_SOURCE_USER_POLICY),
ImportParams("toplevel_openvpn_clientcert.onc",
- "net/shill_for_toplevel_openvpn_clientcert.json",
+ "chromeos/net/shill_for_toplevel_openvpn_clientcert.json",
onc::ONC_SOURCE_USER_POLICY),
ImportParams("toplevel_wifi_remove.onc",
- "net/shill_for_toplevel_wifi_remove.json",
+ "chromeos/net/shill_for_toplevel_wifi_remove.json",
onc::ONC_SOURCE_USER_POLICY),
- ImportParams("toplevel_with_unknown_fields.onc",
- "net/shill_for_toplevel_with_unknown_fields.json",
- onc::ONC_SOURCE_USER_POLICY,
- false)));
+ ImportParams(
+ "toplevel_with_unknown_fields.onc",
+ "chromeos/net/shill_for_toplevel_with_unknown_fields.json",
+ onc::ONC_SOURCE_USER_POLICY,
+ false)));
// TODO(stevenjb): Test remembered networks.
diff --git a/chrome/browser/chromeos/drive/drive_cache_unittest.cc b/chrome/browser/chromeos/drive/drive_cache_unittest.cc
index e188dbd..53fd069 100644
--- a/chrome/browser/chromeos/drive/drive_cache_unittest.cc
+++ b/chrome/browser/chromeos/drive/drive_cache_unittest.cc
@@ -142,7 +142,8 @@ class DriveCacheTest : public testing::Test {
// Copy file from data dir to cache.
if (!std::string(resource.source_file).empty()) {
base::FilePath source_path =
- google_apis::test_util::GetTestFilePath(resource.source_file);
+ google_apis::test_util::GetTestFilePath(
+ std::string("chromeos/") + resource.source_file);
DriveFileError error = DRIVE_FILE_OK;
cache_->Store(
@@ -685,7 +686,7 @@ TEST_F(DriveCacheTest, StoreToCacheSimple) {
// Store an existing file.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
@@ -700,7 +701,8 @@ TEST_F(DriveCacheTest, StoreToCacheSimple) {
md5 = "new_md5";
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/subdir_feed.json"),
+ google_apis::test_util::GetTestFilePath(
+ "chromeos/gdata/subdir_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
@@ -717,7 +719,7 @@ TEST_F(DriveCacheTest, GetFromCacheSimple) {
// First store a file to cache.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
@@ -746,7 +748,7 @@ TEST_F(DriveCacheTest, RemoveFromCacheSimple) {
// First store a file to cache.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
@@ -758,7 +760,7 @@ TEST_F(DriveCacheTest, RemoveFromCacheSimple) {
resource_id = "pdf:`~!@#$%^&*()-_=+[{|]}\\;',<.>/?";
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
@@ -777,7 +779,7 @@ TEST_F(DriveCacheTest, PinAndUnpin) {
// First store a file to cache.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
@@ -842,7 +844,7 @@ TEST_F(DriveCacheTest, StoreToCachePinned) {
// Store an existing file to a previously pinned file.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK,
test_util::TEST_CACHE_STATE_PRESENT |
test_util::TEST_CACHE_STATE_PINNED |
@@ -877,7 +879,7 @@ TEST_F(DriveCacheTest, GetFromCachePinned) {
// Store an existing file to the previously pinned non-existent file.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK,
test_util::TEST_CACHE_STATE_PRESENT |
test_util::TEST_CACHE_STATE_PINNED |
@@ -900,7 +902,7 @@ TEST_F(DriveCacheTest, RemoveFromCachePinned) {
// Store a file to cache, and pin it.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
TestPin(resource_id, md5, DRIVE_FILE_OK,
@@ -919,7 +921,7 @@ TEST_F(DriveCacheTest, RemoveFromCachePinned) {
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
TestPin(resource_id, md5, DRIVE_FILE_OK,
@@ -941,7 +943,7 @@ TEST_F(DriveCacheTest, DirtyCacheSimple) {
// First store a file to cache.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
@@ -976,7 +978,7 @@ TEST_F(DriveCacheTest, DirtyCachePinned) {
// First store a file to cache and pin it.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
TestPin(resource_id, md5, DRIVE_FILE_OK,
@@ -1022,7 +1024,7 @@ TEST_F(DriveCacheTest, PinAndUnpinDirtyCache) {
// First store a file to cache and mark it as dirty.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
TestMarkDirty(resource_id, md5, DRIVE_FILE_OK,
@@ -1071,7 +1073,7 @@ TEST_F(DriveCacheTest, DirtyCacheRepetitive) {
// First store a file to cache.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
@@ -1153,7 +1155,7 @@ TEST_F(DriveCacheTest, DirtyCacheInvalid) {
// Store a file to cache.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
@@ -1177,7 +1179,8 @@ TEST_F(DriveCacheTest, DirtyCacheInvalid) {
md5 = "new_md5";
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/subdir_feed.json"),
+ google_apis::test_util::GetTestFilePath(
+ "chromeos/gdata/subdir_feed.json"),
DRIVE_FILE_ERROR_IN_USE,
test_util::TEST_CACHE_STATE_PRESENT |
test_util::TEST_CACHE_STATE_DIRTY |
@@ -1196,7 +1199,7 @@ TEST_F(DriveCacheTest, RemoveFromDirtyCache) {
// Store a file to cache, pin it, mark it dirty and commit it.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
TestPin(resource_id, md5, DRIVE_FILE_OK,
@@ -1232,7 +1235,7 @@ TEST_F(DriveCacheTest, MountUnmount) {
// First store a file to cache in the tmp subdir.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
@@ -1296,7 +1299,7 @@ TEST_F(DriveCacheTest, ClearAll) {
// Store an existing file.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_OK, test_util::TEST_CACHE_STATE_PRESENT,
DriveCache::CACHE_TYPE_TMP);
@@ -1325,7 +1328,7 @@ TEST_F(DriveCacheTest, StoreToCacheNoSpace) {
// Try to store an existing file.
TestStoreToCache(
resource_id, md5,
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
DRIVE_FILE_ERROR_NO_SPACE,
test_util::TEST_CACHE_STATE_NONE,
DriveCache::CACHE_TYPE_TMP);
diff --git a/chrome/browser/chromeos/drive/drive_file_system_unittest.cc b/chrome/browser/chromeos/drive/drive_file_system_unittest.cc
index c889700..f09e7cd 100644
--- a/chrome/browser/chromeos/drive/drive_file_system_unittest.cc
+++ b/chrome/browser/chromeos/drive/drive_file_system_unittest.cc
@@ -101,7 +101,7 @@ class FakeDriveUploader : public google_apis::DriveUploaderInterface {
// DriveUploaderInterface overrides.
// Pretends that a new file was uploaded successfully, and returns the
- // contents of "gdata/uploaded_file.json" to the caller.
+ // contents of "chromeos/gdata/uploaded_file.json" to the caller.
virtual void UploadNewFile(
const std::string& parent_resource_id,
const base::FilePath& drive_file_path,
@@ -112,7 +112,8 @@ class FakeDriveUploader : public google_apis::DriveUploaderInterface {
DCHECK(!callback.is_null());
scoped_ptr<base::Value> value =
- google_apis::test_util::LoadJSONFile("gdata/uploaded_file.json");
+ google_apis::test_util::LoadJSONFile(
+ "chromeos/gdata/uploaded_file.json");
scoped_ptr<google_apis::ResourceEntry> resource_entry(
google_apis::ResourceEntry::ExtractAndParse(*value));
@@ -127,7 +128,7 @@ class FakeDriveUploader : public google_apis::DriveUploaderInterface {
// Pretends that an existing file ("drive/File 1.txt") was uploaded
// successfully, and returns an entry for the file in
- // "gdata/root_feed.json" to the caller.
+ // "chromeos/gdata/root_feed.json" to the caller.
virtual void UploadExistingFile(
const std::string& resource_id,
const base::FilePath& drive_file_path,
@@ -148,7 +149,7 @@ class FakeDriveUploader : public google_apis::DriveUploaderInterface {
// up. crbug.com/134240.
scoped_ptr<google_apis::ResourceEntry> resource_entry;
scoped_ptr<base::Value> value =
- google_apis::test_util::LoadJSONFile("gdata/root_feed.json");
+ google_apis::test_util::LoadJSONFile("chromeos/gdata/root_feed.json");
if (!value.get())
return;
@@ -202,10 +203,10 @@ class DriveFileSystemTest : public testing::Test {
// The fake object will be manually deleted in TearDown().
fake_drive_service_ = new google_apis::FakeDriveService;
fake_drive_service_->LoadResourceListForWapi(
- "gdata/root_feed.json");
+ "chromeos/gdata/root_feed.json");
fake_drive_service_->LoadAccountMetadataForWapi(
- "gdata/account_metadata.json");
- fake_drive_service_->LoadAppListForDriveApi("drive/applist.json");
+ "chromeos/gdata/account_metadata.json");
+ fake_drive_service_->LoadAppListForDriveApi("chromeos/drive/applist.json");
fake_free_disk_space_getter_.reset(new FakeFreeDiskSpaceGetter);
@@ -579,7 +580,7 @@ TEST_F(DriveFileSystemTest, GetNonRootEntry) {
}
TEST_F(DriveFileSystemTest, SearchRootDirectory) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
const base::FilePath kFilePath = base::FilePath(FILE_PATH_LITERAL("drive"));
scoped_ptr<DriveEntryProto> entry = GetEntryInfoByPathSync(kFilePath);
@@ -588,7 +589,7 @@ TEST_F(DriveFileSystemTest, SearchRootDirectory) {
}
TEST_F(DriveFileSystemTest, SearchExistingFile) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
const base::FilePath kFilePath = base::FilePath(
FILE_PATH_LITERAL("drive/File 1.txt"));
@@ -598,7 +599,7 @@ TEST_F(DriveFileSystemTest, SearchExistingFile) {
}
TEST_F(DriveFileSystemTest, SearchExistingDocument) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
const base::FilePath kFilePath = base::FilePath(
FILE_PATH_LITERAL("drive/Document 1.gdoc"));
@@ -608,7 +609,7 @@ TEST_F(DriveFileSystemTest, SearchExistingDocument) {
}
TEST_F(DriveFileSystemTest, SearchNonExistingFile) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
const base::FilePath kFilePath = base::FilePath(
FILE_PATH_LITERAL("drive/nonexisting.file"));
@@ -617,7 +618,7 @@ TEST_F(DriveFileSystemTest, SearchNonExistingFile) {
}
TEST_F(DriveFileSystemTest, SearchEncodedFileNames) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
const base::FilePath kFilePath1 = base::FilePath(
FILE_PATH_LITERAL("drive/Slash / in file 1.txt"));
@@ -638,7 +639,7 @@ TEST_F(DriveFileSystemTest, SearchEncodedFileNames) {
}
TEST_F(DriveFileSystemTest, SearchEncodedFileNamesLoadingRoot) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
const base::FilePath kFilePath1 = base::FilePath(
FILE_PATH_LITERAL("drive/Slash / in file 1.txt"));
@@ -659,7 +660,7 @@ TEST_F(DriveFileSystemTest, SearchEncodedFileNamesLoadingRoot) {
}
TEST_F(DriveFileSystemTest, SearchDuplicateNames) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
const base::FilePath kFilePath1 = base::FilePath(
FILE_PATH_LITERAL("drive/Duplicate Name.txt"));
@@ -684,7 +685,7 @@ TEST_F(DriveFileSystemTest, SearchDuplicateNames) {
}
TEST_F(DriveFileSystemTest, SearchExistingDirectory) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
const base::FilePath kFilePath = base::FilePath(
FILE_PATH_LITERAL("drive/Directory 1"));
@@ -694,7 +695,7 @@ TEST_F(DriveFileSystemTest, SearchExistingDirectory) {
}
TEST_F(DriveFileSystemTest, SearchInSubdir) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
const base::FilePath kFilePath = base::FilePath(
FILE_PATH_LITERAL("drive/Directory 1/SubDirectory File 1.txt"));
@@ -705,7 +706,7 @@ TEST_F(DriveFileSystemTest, SearchInSubdir) {
// Check the reconstruction of the directory structure from only the root feed.
TEST_F(DriveFileSystemTest, SearchInSubSubdir) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
const base::FilePath kFilePath = base::FilePath(
FILE_PATH_LITERAL("drive/Directory 1/Sub Directory Folder/"
@@ -716,7 +717,7 @@ TEST_F(DriveFileSystemTest, SearchInSubSubdir) {
}
TEST_F(DriveFileSystemTest, FilePathTests) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
EXPECT_TRUE(
EntryExists(base::FilePath(FILE_PATH_LITERAL("drive/File 1.txt"))));
@@ -728,23 +729,23 @@ TEST_F(DriveFileSystemTest, FilePathTests) {
}
TEST_F(DriveFileSystemTest, ChangeFeed_AddAndDeleteFileInRoot) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
Eq(base::FilePath(FILE_PATH_LITERAL("drive"))))).Times(2);
- ASSERT_TRUE(LoadChangeFeed("gdata/delta_file_added_in_root.json"));
+ ASSERT_TRUE(LoadChangeFeed("chromeos/gdata/delta_file_added_in_root.json"));
EXPECT_TRUE(
EntryExists(base::FilePath(FILE_PATH_LITERAL("drive/Added file.gdoc"))));
- ASSERT_TRUE(LoadChangeFeed("gdata/delta_file_deleted_in_root.json"));
+ ASSERT_TRUE(LoadChangeFeed("chromeos/gdata/delta_file_deleted_in_root.json"));
EXPECT_FALSE(
EntryExists(base::FilePath(FILE_PATH_LITERAL("drive/Added file.gdoc"))));
}
TEST_F(DriveFileSystemTest, ChangeFeed_AddAndDeleteFileFromExistingDirectory) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
EXPECT_TRUE(
EntryExists(base::FilePath(FILE_PATH_LITERAL("drive/Directory 1"))));
@@ -754,14 +755,16 @@ TEST_F(DriveFileSystemTest, ChangeFeed_AddAndDeleteFileFromExistingDirectory) {
Eq(base::FilePath(FILE_PATH_LITERAL("drive"))))).Times(1);
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
Eq(base::FilePath(FILE_PATH_LITERAL("drive/Directory 1"))))).Times(1);
- ASSERT_TRUE(LoadChangeFeed("gdata/delta_file_added_in_directory.json"));
+ ASSERT_TRUE(
+ LoadChangeFeed("chromeos/gdata/delta_file_added_in_directory.json"));
EXPECT_TRUE(EntryExists(base::FilePath(
FILE_PATH_LITERAL("drive/Directory 1/Added file.gdoc"))));
// Remove that file from the directory.
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
Eq(base::FilePath(FILE_PATH_LITERAL("drive/Directory 1"))))).Times(1);
- ASSERT_TRUE(LoadChangeFeed("gdata/delta_file_deleted_in_directory.json"));
+ ASSERT_TRUE(
+ LoadChangeFeed("chromeos/gdata/delta_file_deleted_in_directory.json"));
EXPECT_TRUE(
EntryExists(base::FilePath(FILE_PATH_LITERAL("drive/Directory 1"))));
EXPECT_FALSE(EntryExists(base::FilePath(
@@ -769,14 +772,15 @@ TEST_F(DriveFileSystemTest, ChangeFeed_AddAndDeleteFileFromExistingDirectory) {
}
TEST_F(DriveFileSystemTest, ChangeFeed_AddFileToNewDirectory) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
// Add file to a new directory.
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
Eq(base::FilePath(FILE_PATH_LITERAL("drive"))))).Times(1);
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
Eq(base::FilePath(FILE_PATH_LITERAL("drive/New Directory"))))).Times(1);
- ASSERT_TRUE(LoadChangeFeed("gdata/delta_file_added_in_new_directory.json"));
+ ASSERT_TRUE(
+ LoadChangeFeed("chromeos/gdata/delta_file_added_in_new_directory.json"));
EXPECT_TRUE(
EntryExists(base::FilePath(FILE_PATH_LITERAL("drive/New Directory"))));
@@ -785,18 +789,18 @@ TEST_F(DriveFileSystemTest, ChangeFeed_AddFileToNewDirectory) {
}
TEST_F(DriveFileSystemTest, ChangeFeed_AddFileToNewButDeletedDirectory) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
// This feed contains the following updates:
// 1) A new PDF file is added to a new directory
// 2) but the new directory is marked "deleted" (i.e. moved to Trash)
// Hence, the PDF file should be just ignored.
ASSERT_TRUE(LoadChangeFeed(
- "gdata/delta_file_added_in_new_but_deleted_directory.json"));
+ "chromeos/gdata/delta_file_added_in_new_but_deleted_directory.json"));
}
TEST_F(DriveFileSystemTest, ChangeFeed_DirectoryMovedFromRootToDirectory) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
EXPECT_TRUE(EntryExists(base::FilePath(FILE_PATH_LITERAL(
"drive/Directory 2"))));
@@ -820,7 +824,7 @@ TEST_F(DriveFileSystemTest, ChangeFeed_DirectoryMovedFromRootToDirectory) {
Eq(base::FilePath(FILE_PATH_LITERAL("drive/Directory 2/Directory 1")))))
.Times(1);
ASSERT_TRUE(LoadChangeFeed(
- "gdata/delta_dir_moved_from_root_to_directory.json"));
+ "chromeos/gdata/delta_dir_moved_from_root_to_directory.json"));
EXPECT_TRUE(EntryExists(base::FilePath(FILE_PATH_LITERAL(
"drive/Directory 2"))));
@@ -838,7 +842,7 @@ TEST_F(DriveFileSystemTest, ChangeFeed_DirectoryMovedFromRootToDirectory) {
}
TEST_F(DriveFileSystemTest, ChangeFeed_FileMovedFromDirectoryToRoot) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
EXPECT_TRUE(EntryExists(base::FilePath(FILE_PATH_LITERAL(
"drive/Directory 1"))));
@@ -854,7 +858,7 @@ TEST_F(DriveFileSystemTest, ChangeFeed_FileMovedFromDirectoryToRoot) {
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
Eq(base::FilePath(FILE_PATH_LITERAL("drive/Directory 1"))))).Times(1);
ASSERT_TRUE(LoadChangeFeed(
- "gdata/delta_file_moved_from_directory_to_root.json"));
+ "chromeos/gdata/delta_file_moved_from_directory_to_root.json"));
EXPECT_TRUE(EntryExists(base::FilePath(FILE_PATH_LITERAL(
"drive/Directory 1"))));
@@ -869,7 +873,7 @@ TEST_F(DriveFileSystemTest, ChangeFeed_FileMovedFromDirectoryToRoot) {
}
TEST_F(DriveFileSystemTest, ChangeFeed_FileRenamedInDirectory) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
EXPECT_TRUE(EntryExists(base::FilePath(FILE_PATH_LITERAL(
"drive/Directory 1"))));
@@ -880,7 +884,8 @@ TEST_F(DriveFileSystemTest, ChangeFeed_FileRenamedInDirectory) {
Eq(base::FilePath(FILE_PATH_LITERAL("drive"))))).Times(1);
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
Eq(base::FilePath(FILE_PATH_LITERAL("drive/Directory 1"))))).Times(1);
- ASSERT_TRUE(LoadChangeFeed("gdata/delta_file_renamed_in_directory.json"));
+ ASSERT_TRUE(LoadChangeFeed(
+ "chromeos/gdata/delta_file_renamed_in_directory.json"));
EXPECT_TRUE(EntryExists(base::FilePath(FILE_PATH_LITERAL(
"drive/Directory 1"))));
@@ -954,7 +959,7 @@ TEST_F(DriveFileSystemTest, OfflineCachedFeedLoading) {
TEST_F(DriveFileSystemTest, TransferFileFromLocalToRemote_RegularFile) {
fake_free_disk_space_getter_->set_fake_free_disk_space(kLotsOfSpace);
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
// We'll add a file to the Drive root directory.
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
@@ -974,7 +979,8 @@ TEST_F(DriveFileSystemTest, TransferFileFromLocalToRemote_RegularFile) {
EXPECT_FALSE(EntryExists(remote_dest_file_path));
scoped_ptr<base::Value> value =
- google_apis::test_util::LoadJSONFile("gdata/document_to_download.json");
+ google_apis::test_util::LoadJSONFile(
+ "chromeos/gdata/document_to_download.json");
scoped_ptr<google_apis::ResourceEntry> resource_entry(
google_apis::ResourceEntry::ExtractAndParse(*value));
@@ -993,7 +999,7 @@ TEST_F(DriveFileSystemTest, TransferFileFromLocalToRemote_RegularFile) {
}
TEST_F(DriveFileSystemTest, TransferFileFromLocalToRemote_HostedDocument) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
// Prepare a local file, which is a json file of a hosted document, which
// matches "Document 1" in root_feed.json.
@@ -1023,7 +1029,8 @@ TEST_F(DriveFileSystemTest, TransferFileFromLocalToRemote_HostedDocument) {
// We'll copy a hosted document using CopyHostedDocument.
// ".gdoc" suffix should be stripped when copying.
scoped_ptr<base::Value> value =
- google_apis::test_util::LoadJSONFile("gdata/uploaded_document.json");
+ google_apis::test_util::LoadJSONFile(
+ "chromeos/gdata/uploaded_document.json");
scoped_ptr<google_apis::ResourceEntry> resource_entry =
google_apis::ResourceEntry::ExtractAndParse(*value);
@@ -1043,7 +1050,7 @@ TEST_F(DriveFileSystemTest, TransferFileFromLocalToRemote_HostedDocument) {
}
TEST_F(DriveFileSystemTest, TransferFileFromRemoteToLocal_RegularFile) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
// The transfered file is cached and the change of "offline avaialble"
// attribute is notified.
@@ -1096,7 +1103,7 @@ TEST_F(DriveFileSystemTest, TransferFileFromRemoteToLocal_RegularFile) {
}
TEST_F(DriveFileSystemTest, TransferFileFromRemoteToLocal_HostedDocument) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
@@ -1123,7 +1130,7 @@ TEST_F(DriveFileSystemTest, CopyNotExistingFile) {
base::FilePath src_file_path(FILE_PATH_LITERAL("drive/Dummy file.txt"));
base::FilePath dest_file_path(FILE_PATH_LITERAL("drive/Test.log"));
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
EXPECT_FALSE(EntryExists(src_file_path));
@@ -1144,7 +1151,7 @@ TEST_F(DriveFileSystemTest, CopyFileToNonExistingDirectory) {
base::FilePath dest_parent_path(FILE_PATH_LITERAL("drive/Dummy"));
base::FilePath dest_file_path(FILE_PATH_LITERAL("drive/Dummy/Test.log"));
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
ASSERT_TRUE(EntryExists(src_file_path));
scoped_ptr<DriveEntryProto> src_entry_proto = GetEntryInfoByPathSync(
@@ -1179,7 +1186,7 @@ TEST_F(DriveFileSystemTest, CopyFileToInvalidPath) {
base::FilePath dest_file_path(FILE_PATH_LITERAL(
"drive/Duplicate Name.txt/Document 1.gdoc"));
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
ASSERT_TRUE(EntryExists(src_file_path));
scoped_ptr<DriveEntryProto> src_entry_proto = GetEntryInfoByPathSync(
@@ -1216,7 +1223,7 @@ TEST_F(DriveFileSystemTest, RenameFile) {
const base::FilePath dest_file_path(
FILE_PATH_LITERAL("drive/Directory 1/Test.log"));
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
ASSERT_TRUE(EntryExists(src_file_path));
scoped_ptr<DriveEntryProto> src_entry_proto = GetEntryInfoByPathSync(
@@ -1247,7 +1254,7 @@ TEST_F(DriveFileSystemTest, MoveFileFromRootToSubDirectory) {
base::FilePath dest_file_path(
FILE_PATH_LITERAL("drive/Directory 1/Test.log"));
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
ASSERT_TRUE(EntryExists(src_file_path));
scoped_ptr<DriveEntryProto> src_entry_proto = GetEntryInfoByPathSync(
@@ -1289,7 +1296,7 @@ TEST_F(DriveFileSystemTest, MoveFileFromSubDirectoryToRoot) {
FILE_PATH_LITERAL("drive/Directory 1/SubDirectory File 1.txt"));
base::FilePath dest_file_path(FILE_PATH_LITERAL("drive/Test.log"));
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
ASSERT_TRUE(EntryExists(src_file_path));
scoped_ptr<DriveEntryProto> src_entry_proto = GetEntryInfoByPathSync(
@@ -1334,12 +1341,13 @@ TEST_F(DriveFileSystemTest, MoveFileBetweenSubDirectories) {
FILE_PATH_LITERAL("drive/New Folder 1/Test.log"));
base::FilePath interim_file_path(FILE_PATH_LITERAL("drive/Test.log"));
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
Eq(base::FilePath(FILE_PATH_LITERAL("drive"))))).Times(1);
- AddDirectoryFromFile(dest_parent_path, "gdata/directory_entry_atom.json");
+ AddDirectoryFromFile(dest_parent_path,
+ "chromeos/gdata/directory_entry_atom.json");
ASSERT_TRUE(EntryExists(src_file_path));
scoped_ptr<DriveEntryProto> src_entry_proto = GetEntryInfoByPathSync(
@@ -1391,7 +1399,7 @@ TEST_F(DriveFileSystemTest, MoveNotExistingFile) {
base::FilePath src_file_path(FILE_PATH_LITERAL("drive/Dummy file.txt"));
base::FilePath dest_file_path(FILE_PATH_LITERAL("drive/Test.log"));
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
EXPECT_FALSE(EntryExists(src_file_path));
@@ -1412,7 +1420,7 @@ TEST_F(DriveFileSystemTest, MoveFileToNonExistingDirectory) {
base::FilePath dest_parent_path(FILE_PATH_LITERAL("drive/Dummy"));
base::FilePath dest_file_path(FILE_PATH_LITERAL("drive/Dummy/Test.log"));
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
ASSERT_TRUE(EntryExists(src_file_path));
scoped_ptr<DriveEntryProto> src_entry_proto = GetEntryInfoByPathSync(
@@ -1445,7 +1453,7 @@ TEST_F(DriveFileSystemTest, MoveFileToInvalidPath) {
base::FilePath dest_file_path(FILE_PATH_LITERAL(
"drive/Duplicate Name.txt/Test.log"));
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
ASSERT_TRUE(EntryExists(src_file_path));
scoped_ptr<DriveEntryProto> src_entry_proto = GetEntryInfoByPathSync(
@@ -1474,7 +1482,7 @@ TEST_F(DriveFileSystemTest, MoveFileToInvalidPath) {
}
TEST_F(DriveFileSystemTest, RemoveEntries) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
base::FilePath nonexisting_file(FILE_PATH_LITERAL("drive/Dummy file.txt"));
base::FilePath file_in_root(FILE_PATH_LITERAL("drive/File 1.txt"));
@@ -1528,7 +1536,7 @@ TEST_F(DriveFileSystemTest, RemoveEntries) {
}
TEST_F(DriveFileSystemTest, CreateDirectory) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
Eq(base::FilePath(FILE_PATH_LITERAL("drive"))))).Times(1);
@@ -1536,7 +1544,7 @@ TEST_F(DriveFileSystemTest, CreateDirectory) {
// Create directory in root.
base::FilePath dir_path(FILE_PATH_LITERAL("drive/New Folder 1"));
EXPECT_FALSE(EntryExists(dir_path));
- AddDirectoryFromFile(dir_path, "gdata/directory_entry_atom.json");
+ AddDirectoryFromFile(dir_path, "chromeos/gdata/directory_entry_atom.json");
EXPECT_TRUE(EntryExists(dir_path));
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
@@ -1546,13 +1554,14 @@ TEST_F(DriveFileSystemTest, CreateDirectory) {
base::FilePath subdir_path(
FILE_PATH_LITERAL("drive/New Folder 1/New Folder 2"));
EXPECT_FALSE(EntryExists(subdir_path));
- AddDirectoryFromFile(subdir_path, "gdata/directory_entry_atom2.json");
+ AddDirectoryFromFile(subdir_path,
+ "chromeos/gdata/directory_entry_atom2.json");
EXPECT_TRUE(EntryExists(subdir_path));
}
// Create a directory through the document service
TEST_F(DriveFileSystemTest, CreateDirectoryWithService) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
Eq(base::FilePath(FILE_PATH_LITERAL("drive"))))).Times(1);
@@ -1568,7 +1577,7 @@ TEST_F(DriveFileSystemTest, CreateDirectoryWithService) {
}
TEST_F(DriveFileSystemTest, GetFileByPath_FromGData_EnoughSpace) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
// The transfered file is cached and the change of "offline avaialble"
// attribute is notified.
@@ -1597,7 +1606,7 @@ TEST_F(DriveFileSystemTest, GetFileByPath_FromGData_EnoughSpace) {
}
TEST_F(DriveFileSystemTest, GetFileByPath_FromGData_NoSpaceAtAll) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
base::FilePath file_in_root(FILE_PATH_LITERAL("drive/File 1.txt"));
scoped_ptr<DriveEntryProto> entry_proto(GetEntryInfoByPathSync(file_in_root));
@@ -1618,7 +1627,7 @@ TEST_F(DriveFileSystemTest, GetFileByPath_FromGData_NoSpaceAtAll) {
}
TEST_F(DriveFileSystemTest, GetFileByPath_FromGData_NoEnoughSpaceButCanFreeUp) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
// The transfered file is cached and the change of "offline avaialble"
// attribute is notified.
@@ -1674,7 +1683,7 @@ TEST_F(DriveFileSystemTest, GetFileByPath_FromGData_NoEnoughSpaceButCanFreeUp) {
}
TEST_F(DriveFileSystemTest, GetFileByPath_FromGData_EnoughSpaceButBecomeFull) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
base::FilePath file_in_root(FILE_PATH_LITERAL("drive/File 1.txt"));
scoped_ptr<DriveEntryProto> entry_proto(GetEntryInfoByPathSync(file_in_root));
@@ -1704,7 +1713,7 @@ TEST_F(DriveFileSystemTest, GetFileByPath_FromGData_EnoughSpaceButBecomeFull) {
TEST_F(DriveFileSystemTest, GetFileByPath_FromCache) {
fake_free_disk_space_getter_->set_fake_free_disk_space(kLotsOfSpace);
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
base::FilePath file_in_root(FILE_PATH_LITERAL("drive/File 1.txt"));
scoped_ptr<DriveEntryProto> entry_proto(GetEntryInfoByPathSync(file_in_root));
@@ -1714,7 +1723,7 @@ TEST_F(DriveFileSystemTest, GetFileByPath_FromCache) {
cache_->Store(entry_proto->resource_id(),
entry_proto->file_specific_info().file_md5(),
google_apis::test_util::GetTestFilePath(
- "gdata/root_feed.json"),
+ "chromeos/gdata/root_feed.json"),
DriveCache::FILE_OPERATION_COPY,
base::Bind(&test_util::CopyErrorCodeFromFileOperationCallback,
&error));
@@ -1734,7 +1743,7 @@ TEST_F(DriveFileSystemTest, GetFileByPath_FromCache) {
}
TEST_F(DriveFileSystemTest, GetFileByPath_HostedDocument) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
base::FilePath file_in_root(FILE_PATH_LITERAL("drive/Document 1.gdoc"));
scoped_ptr<DriveEntryProto> src_entry_proto =
@@ -1765,7 +1774,7 @@ TEST_F(DriveFileSystemTest, GetFileByResourceId) {
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
Eq(base::FilePath(FILE_PATH_LITERAL("drive"))))).Times(1);
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
base::FilePath file_in_root(FILE_PATH_LITERAL("drive/File 1.txt"));
scoped_ptr<DriveEntryProto> entry_proto(GetEntryInfoByPathSync(file_in_root));
@@ -1788,7 +1797,7 @@ TEST_F(DriveFileSystemTest, GetFileByResourceId) {
TEST_F(DriveFileSystemTest, GetFileByResourceId_FromCache) {
fake_free_disk_space_getter_->set_fake_free_disk_space(kLotsOfSpace);
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
base::FilePath file_in_root(FILE_PATH_LITERAL("drive/File 1.txt"));
scoped_ptr<DriveEntryProto> entry_proto(GetEntryInfoByPathSync(file_in_root));
@@ -1798,7 +1807,7 @@ TEST_F(DriveFileSystemTest, GetFileByResourceId_FromCache) {
cache_->Store(entry_proto->resource_id(),
entry_proto->file_specific_info().file_md5(),
google_apis::test_util::GetTestFilePath(
- "gdata/root_feed.json"),
+ "chromeos/gdata/root_feed.json"),
DriveCache::FILE_OPERATION_COPY,
base::Bind(&test_util::CopyErrorCodeFromFileOperationCallback,
&error));
@@ -1826,7 +1835,7 @@ TEST_F(DriveFileSystemTest, GetFileByResourceId_FromCache) {
TEST_F(DriveFileSystemTest, UpdateFileByResourceId_PersistentFile) {
fake_free_disk_space_getter_->set_fake_free_disk_space(kLotsOfSpace);
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
// This is a file defined in root_feed.json.
const base::FilePath kFilePath(FILE_PATH_LITERAL("drive/File 1.txt"));
@@ -1847,7 +1856,7 @@ TEST_F(DriveFileSystemTest, UpdateFileByResourceId_PersistentFile) {
kMd5,
// Anything works.
google_apis::test_util::GetTestFilePath(
- "gdata/root_feed.json"),
+ "chromeos/gdata/root_feed.json"),
DriveCache::FILE_OPERATION_COPY,
base::Bind(&test_util::CopyErrorCodeFromFileOperationCallback,
&error));
@@ -1897,7 +1906,7 @@ TEST_F(DriveFileSystemTest, UpdateFileByResourceId_PersistentFile) {
}
TEST_F(DriveFileSystemTest, UpdateFileByResourceId_NonexistentFile) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
// This is nonexistent in root_feed.json.
const base::FilePath kFilePath(FILE_PATH_LITERAL("drive/Nonexistent.txt"));
@@ -1916,7 +1925,7 @@ TEST_F(DriveFileSystemTest, UpdateFileByResourceId_NonexistentFile) {
}
TEST_F(DriveFileSystemTest, ContentSearch) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
const SearchResultPair kExpectedResults[] = {
{ "drive/Directory 1/Sub Directory Folder/Sub Sub Directory Folder",
@@ -1937,7 +1946,7 @@ TEST_F(DriveFileSystemTest, ContentSearch) {
}
TEST_F(DriveFileSystemTest, ContentSearchWithNewEntry) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
// Create a new directory in the drive service.
google_apis::GDataErrorCode error = google_apis::GDATA_OTHER_ERROR;
@@ -1977,7 +1986,7 @@ TEST_F(DriveFileSystemTest, ContentSearchWithNewEntry) {
}
TEST_F(DriveFileSystemTest, ContentSearchEmptyResult) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
const SearchResultPair* expected_results = NULL;
@@ -2001,7 +2010,7 @@ TEST_F(DriveFileSystemTest, GetAvailableSpace) {
}
TEST_F(DriveFileSystemTest, RefreshDirectory) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
// We'll notify the directory change to the observer.
EXPECT_CALL(*mock_directory_observer_,
@@ -2017,7 +2026,7 @@ TEST_F(DriveFileSystemTest, RefreshDirectory) {
}
TEST_F(DriveFileSystemTest, OpenAndCloseFile) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
// The transfered file is cached and the change of "offline avaialble"
// attribute is notified.
diff --git a/chrome/browser/chromeos/drive/drive_scheduler_unittest.cc b/chrome/browser/chromeos/drive/drive_scheduler_unittest.cc
index 6c20fcd..0412a196 100644
--- a/chrome/browser/chromeos/drive/drive_scheduler_unittest.cc
+++ b/chrome/browser/chromeos/drive/drive_scheduler_unittest.cc
@@ -83,11 +83,11 @@ class DriveSchedulerTest : public testing::Test {
fake_drive_service_.reset(new google_apis::FakeDriveService());
fake_drive_service_->LoadResourceListForWapi(
- "gdata/root_feed.json");
+ "chromeos/gdata/root_feed.json");
fake_drive_service_->LoadAccountMetadataForWapi(
- "gdata/account_metadata.json");
+ "chromeos/gdata/account_metadata.json");
fake_drive_service_->LoadAppListForDriveApi(
- "drive/applist.json");
+ "chromeos/drive/applist.json");
fake_uploader_.reset(new FakeDriveUploader);
scheduler_.reset(new DriveScheduler(profile_.get(),
diff --git a/chrome/browser/chromeos/drive/drive_webapps_registry_unittest.cc b/chrome/browser/chromeos/drive/drive_webapps_registry_unittest.cc
index 4461814..8564ac6 100644
--- a/chrome/browser/chromeos/drive/drive_webapps_registry_unittest.cc
+++ b/chrome/browser/chromeos/drive/drive_webapps_registry_unittest.cc
@@ -75,7 +75,8 @@ class DriveWebAppsRegistryTest : public testing::Test {
TEST_F(DriveWebAppsRegistryTest, LoadAndFindWebApps) {
scoped_ptr<Value> document =
- google_apis::test_util::LoadJSONFile("gdata/account_metadata.json");
+ google_apis::test_util::LoadJSONFile(
+ "chromeos/gdata/account_metadata.json");
ASSERT_TRUE(document.get());
ASSERT_TRUE(document->GetType() == Value::TYPE_DICTIONARY);
DictionaryValue* entry_value;
@@ -124,7 +125,7 @@ TEST_F(DriveWebAppsRegistryTest, LoadAndFindWebApps) {
TEST_F(DriveWebAppsRegistryTest, LoadAndFindDriveWebApps) {
scoped_ptr<Value> document =
- google_apis::test_util::LoadJSONFile("drive/applist.json");
+ google_apis::test_util::LoadJSONFile("chromeos/drive/applist.json");
ASSERT_TRUE(document.get());
ASSERT_TRUE(document->GetType() == Value::TYPE_DICTIONARY);
diff --git a/chrome/browser/chromeos/drive/file_system/create_directory_operation_unittest.cc b/chrome/browser/chromeos/drive/file_system/create_directory_operation_unittest.cc
index fa2c0fb..afa5ef5 100644
--- a/chrome/browser/chromeos/drive/file_system/create_directory_operation_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system/create_directory_operation_unittest.cc
@@ -40,10 +40,11 @@ class CreateDirectoryOperationTest
profile_.reset(new TestingProfile);
fake_drive_service_.reset(new google_apis::FakeDriveService);
- fake_drive_service_->LoadResourceListForWapi("gdata/root_feed.json");
+ fake_drive_service_->LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json");
fake_drive_service_->LoadAccountMetadataForWapi(
- "gdata/account_metadata.json");
- fake_drive_service_->LoadAppListForDriveApi("drive/applist.json");
+ "chromeos/gdata/account_metadata.json");
+ fake_drive_service_->LoadAppListForDriveApi("chromeos/drive/applist.json");
metadata_.reset(
new DriveResourceMetadata(fake_drive_service_->GetRootResourceId()));
@@ -144,7 +145,7 @@ class CreateDirectoryOperationTest
};
TEST_F(CreateDirectoryOperationTest, FindFirstMissingParentDirectory) {
- ASSERT_TRUE(LoadRootFeedDocument("gdata/root_feed.json"));
+ ASSERT_TRUE(LoadRootFeedDocument("chromeos/gdata/root_feed.json"));
CreateDirectoryOperation::FindFirstMissingParentDirectoryResult result;
diff --git a/chrome/browser/chromeos/drive/resource_entry_conversion_unittest.cc b/chrome/browser/chromeos/drive/resource_entry_conversion_unittest.cc
index d31db49e..05e2132 100644
--- a/chrome/browser/chromeos/drive/resource_entry_conversion_unittest.cc
+++ b/chrome/browser/chromeos/drive/resource_entry_conversion_unittest.cc
@@ -16,7 +16,7 @@ namespace drive {
TEST(ResourceEntryConversionTest, ConvertResourceEntryToDriveEntryProto_File) {
scoped_ptr<base::Value> value =
- google_apis::test_util::LoadJSONFile("gdata/file_entry.json");
+ google_apis::test_util::LoadJSONFile("chromeos/gdata/file_entry.json");
ASSERT_TRUE(value.get());
scoped_ptr<google_apis::ResourceEntry> resource_entry(
@@ -97,7 +97,8 @@ TEST(ResourceEntryConversionTest, ConvertResourceEntryToDriveEntryProto_File) {
TEST(ResourceEntryConversionTest,
ConvertResourceEntryToDriveEntryProto_HostedDocument) {
scoped_ptr<base::Value> value =
- google_apis::test_util::LoadJSONFile("gdata/hosted_document_entry.json");
+ google_apis::test_util::LoadJSONFile(
+ "chromeos/gdata/hosted_document_entry.json");
ASSERT_TRUE(value.get());
scoped_ptr<google_apis::ResourceEntry> resource_entry(
@@ -181,7 +182,8 @@ TEST(ResourceEntryConversionTest,
TEST(ResourceEntryConversionTest,
ConvertResourceEntryToDriveEntryProto_Directory) {
scoped_ptr<base::Value> value =
- google_apis::test_util::LoadJSONFile("gdata/directory_entry.json");
+ google_apis::test_util::LoadJSONFile(
+ "chromeos/gdata/directory_entry.json");
ASSERT_TRUE(value.get());
scoped_ptr<google_apis::ResourceEntry> resource_entry(
@@ -259,7 +261,7 @@ TEST(ResourceEntryConversionTest,
ConvertResourceEntryToDriveEntryProto_DeletedHostedDocument) {
scoped_ptr<base::Value> value =
google_apis::test_util::LoadJSONFile(
- "gdata/deleted_hosted_document_entry.json");
+ "chromeos/gdata/deleted_hosted_document_entry.json");
ASSERT_TRUE(value.get());
scoped_ptr<google_apis::ResourceEntry> resource_entry(
diff --git a/chrome/browser/chromeos/drive/search_metadata_unittest.cc b/chrome/browser/chromeos/drive/search_metadata_unittest.cc
index 012f303..24fbc03 100644
--- a/chrome/browser/chromeos/drive/search_metadata_unittest.cc
+++ b/chrome/browser/chromeos/drive/search_metadata_unittest.cc
@@ -44,7 +44,7 @@ class SearchMetadataTest : public testing::Test {
NULL, // webapps registry
blocking_task_runner_));
file_system_->Initialize();
- ASSERT_TRUE(test_util::LoadChangeFeed("gdata/root_feed.json",
+ ASSERT_TRUE(test_util::LoadChangeFeed("chromeos/gdata/root_feed.json",
file_system_->change_list_loader(),
false,
1));
diff --git a/chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc b/chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc
index 324812d..c8a8b45 100644
--- a/chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc
+++ b/chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc
@@ -60,10 +60,10 @@ class StaleCacheFilesRemoverTest : public testing::Test {
fake_drive_service_.reset(new google_apis::FakeDriveService);
fake_drive_service_->LoadResourceListForWapi(
- "gdata/root_feed.json");
+ "chromeos/gdata/root_feed.json");
fake_drive_service_->LoadAccountMetadataForWapi(
- "gdata/account_metadata.json");
- fake_drive_service_->LoadAppListForDriveApi("drive/applist.json");
+ "chromeos/gdata/account_metadata.json");
+ fake_drive_service_->LoadAppListForDriveApi("chromeos/drive/applist.json");
fake_free_disk_space_getter_.reset(new FakeFreeDiskSpaceGetter);
@@ -135,7 +135,7 @@ class StaleCacheFilesRemoverTest : public testing::Test {
TEST_F(StaleCacheFilesRemoverTest, RemoveStaleCacheFiles) {
base::FilePath dummy_file =
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json");
+ google_apis::test_util::GetTestFilePath("chromeos/gdata/root_feed.json");
std::string resource_id("pdf:1a2b3c");
std::string md5("abcdef0123456789");
diff --git a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
index fb65249..18cfa91 100644
--- a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
+++ b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
@@ -97,7 +97,8 @@ const char kTestFileContent[] = "xxxxxxxxxxxxx";
//
// All files except test_dir/empty_file.foo, which is empty, initially contain
// kTestFileContent.
-const char kTestRootFeed[] = "gdata/remote_file_system_apitest_root_feed.json";
+const char kTestRootFeed[] =
+ "chromeos/gdata/remote_file_system_apitest_root_feed.json";
// Creates a test file with predetermined content. Returns true on success.
bool CreateFileWithContent(const base::FilePath& path,
@@ -343,8 +344,8 @@ class DriveFileSystemExtensionApiTest : public FileSystemExtensionApiTestBase {
fake_drive_service_ = new google_apis::FakeDriveService;
fake_drive_service_->LoadResourceListForWapi(kTestRootFeed);
fake_drive_service_->LoadAccountMetadataForWapi(
- "gdata/account_metadata.json");
- fake_drive_service_->LoadAppListForDriveApi("drive/applist.json");
+ "chromeos/gdata/account_metadata.json");
+ fake_drive_service_->LoadAppListForDriveApi("chromeos/drive/applist.json");
return new drive::DriveSystemService(profile,
fake_drive_service_,
diff --git a/chrome/browser/chromeos/net/onc_utils_unittest.cc b/chrome/browser/chromeos/net/onc_utils_unittest.cc
index 90e1106..dd341aa 100644
--- a/chrome/browser/chromeos/net/onc_utils_unittest.cc
+++ b/chrome/browser/chromeos/net/onc_utils_unittest.cc
@@ -19,7 +19,7 @@ namespace onc {
TEST(ONCUtils, ProxySettingsToProxyConfig) {
scoped_ptr<base::Value> test_data =
- google_apis::test_util::LoadJSONFile("net/proxy_config.json");
+ google_apis::test_util::LoadJSONFile("chromeos/net/proxy_config.json");
base::ListValue* list_of_tests;
test_data->GetAsList(&list_of_tests);
@@ -72,14 +72,15 @@ INSTANTIATE_TEST_CASE_P(
ONCCreateUIDataTest,
::testing::Values(
std::make_pair("valid_wifi_clientcert.onc",
- "net/uidata_for_wifi_clientcert.json"),
+ "chromeos/net/uidata_for_wifi_clientcert.json"),
std::make_pair("valid_wifi_clientref.onc",
- "net/uidata_for_wifi_clientref.json"),
- std::make_pair("valid_wifi_psk.onc", "net/uidata_for_wifi_psk.json"),
+ "chromeos/net/uidata_for_wifi_clientref.json"),
+ std::make_pair("valid_wifi_psk.onc",
+ "chromeos/net/uidata_for_wifi_psk.json"),
std::make_pair("valid_openvpn_clientcert.onc",
- "net/uidata_for_openvpn_clientcert.json"),
+ "chromeos/net/uidata_for_openvpn_clientcert.json"),
std::make_pair("valid_l2tpipsec_clientcert.onc",
- "net/uidata_for_l2tpipsec_clientcert.json")));
+ "chromeos/net/uidata_for_l2tpipsec_clientcert.json")));
} // namespace onc
} // namespace chromeos
diff --git a/chrome/browser/google_apis/base_operations_server_unittest.cc b/chrome/browser/google_apis/base_operations_server_unittest.cc
index 5aeba15..a701ff1 100644
--- a/chrome/browser/google_apis/base_operations_server_unittest.cc
+++ b/chrome/browser/google_apis/base_operations_server_unittest.cc
@@ -102,7 +102,7 @@ TEST_F(BaseOperationsServerTest, DownloadFileOperation_ValidFile) {
&result_code,
&contents),
GetContentCallback(),
- test_server_.GetURL("/files/gdata/testfile.txt"),
+ test_server_.GetURL("/files/chromeos/gdata/testfile.txt"),
base::FilePath::FromUTF8Unsafe("/dummy/gdata/testfile.txt"),
GetTestCachedFilePath(
base::FilePath::FromUTF8Unsafe("cached_testfile.txt")));
@@ -112,10 +112,10 @@ TEST_F(BaseOperationsServerTest, DownloadFileOperation_ValidFile) {
EXPECT_EQ(HTTP_SUCCESS, result_code);
EXPECT_EQ(test_server::METHOD_GET, http_request_.method);
- EXPECT_EQ("/files/gdata/testfile.txt", http_request_.relative_url);
+ EXPECT_EQ("/files/chromeos/gdata/testfile.txt", http_request_.relative_url);
const base::FilePath expected_path =
- test_util::GetTestFilePath("gdata/testfile.txt");
+ test_util::GetTestFilePath("chromeos/gdata/testfile.txt");
std::string expected_contents;
file_util::ReadFileToString(expected_path, &expected_contents);
EXPECT_EQ(expected_contents, contents);
@@ -133,7 +133,7 @@ TEST_F(BaseOperationsServerTest,
&result_code,
&contents),
GetContentCallback(),
- test_server_.GetURL("/files/gdata/no-such-file.txt"),
+ test_server_.GetURL("/files/chromeos/gdata/no-such-file.txt"),
base::FilePath::FromUTF8Unsafe("/dummy/gdata/no-such-file.txt"),
GetTestCachedFilePath(
base::FilePath::FromUTF8Unsafe("cache_no-such-file.txt")));
@@ -143,7 +143,8 @@ TEST_F(BaseOperationsServerTest,
EXPECT_EQ(HTTP_NOT_FOUND, result_code);
EXPECT_EQ(test_server::METHOD_GET, http_request_.method);
- EXPECT_EQ("/files/gdata/no-such-file.txt", http_request_.relative_url);
+ EXPECT_EQ("/files/chromeos/gdata/no-such-file.txt",
+ http_request_.relative_url);
// Do not verify the not found message.
}
diff --git a/chrome/browser/google_apis/drive_api_operations_unittest.cc b/chrome/browser/google_apis/drive_api_operations_unittest.cc
index 0166417..8216c08 100644
--- a/chrome/browser/google_apis/drive_api_operations_unittest.cc
+++ b/chrome/browser/google_apis/drive_api_operations_unittest.cc
@@ -291,7 +291,7 @@ class DriveApiOperationsTest : public testing::Test {
// (dummy) metadata.
scoped_ptr<test_server::HttpResponse> response =
test_util::CreateHttpResponseFromFile(
- test_util::GetTestFilePath("drive/file_entry.json"));
+ test_util::GetTestFilePath("chromeos/drive/file_entry.json"));
// The response code is CREATED if it is new file uploading.
if (http_request_.relative_url == kTestUploadNewFilePath) {
@@ -329,7 +329,8 @@ class DriveApiOperationsTest : public testing::Test {
TEST_F(DriveApiOperationsTest, GetAboutOperation_ValidFeed) {
// Set an expected data file containing valid result.
- expected_data_file_path_ = test_util::GetTestFilePath("drive/about.json");
+ expected_data_file_path_ = test_util::GetTestFilePath(
+ "chromeos/drive/about.json");
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<AboutResource> feed_data;
@@ -349,7 +350,8 @@ TEST_F(DriveApiOperationsTest, GetAboutOperation_ValidFeed) {
EXPECT_EQ("/drive/v2/about", http_request_.relative_url);
scoped_ptr<AboutResource> expected(
- AboutResource::CreateFrom(*test_util::LoadJSONFile("drive/about.json")));
+ AboutResource::CreateFrom(
+ *test_util::LoadJSONFile("chromeos/drive/about.json")));
ASSERT_TRUE(feed_data.get());
EXPECT_EQ(expected->largest_change_id(), feed_data->largest_change_id());
EXPECT_EQ(expected->quota_bytes_total(), feed_data->quota_bytes_total());
@@ -359,7 +361,8 @@ TEST_F(DriveApiOperationsTest, GetAboutOperation_ValidFeed) {
TEST_F(DriveApiOperationsTest, GetAboutOperation_InvalidFeed) {
// Set an expected data file containing invalid result.
- expected_data_file_path_ = test_util::GetTestFilePath("gdata/testfile.txt");
+ expected_data_file_path_ = test_util::GetTestFilePath(
+ "chromeos/gdata/testfile.txt");
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<AboutResource> feed_data;
@@ -384,7 +387,7 @@ TEST_F(DriveApiOperationsTest, GetAboutOperation_InvalidFeed) {
TEST_F(DriveApiOperationsTest, CreateDirectoryOperation) {
// Set an expected data file containing the directory's entry data.
expected_data_file_path_ =
- test_util::GetTestFilePath("drive/directory_entry.json");
+ test_util::GetTestFilePath("chromeos/drive/directory_entry.json");
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<FileResource> feed_data;
@@ -412,7 +415,7 @@ TEST_F(DriveApiOperationsTest, CreateDirectoryOperation) {
scoped_ptr<FileResource> expected(
FileResource::CreateFrom(
- *test_util::LoadJSONFile("drive/directory_entry.json")));
+ *test_util::LoadJSONFile("chromeos/drive/directory_entry.json")));
// Sanity check.
ASSERT_TRUE(feed_data.get());
@@ -427,7 +430,7 @@ TEST_F(DriveApiOperationsTest, RenameResourceOperation) {
// Set an expected data file containing the directory's entry data.
// It'd be returned if we rename a directory.
expected_data_file_path_ =
- test_util::GetTestFilePath("drive/directory_entry.json");
+ test_util::GetTestFilePath("chromeos/drive/directory_entry.json");
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -458,7 +461,7 @@ TEST_F(DriveApiOperationsTest, CopyResourceOperation) {
// Set an expected data file containing the dummy file entry data.
// It'd be returned if we copy a file.
expected_data_file_path_ =
- test_util::GetTestFilePath("drive/file_entry.json");
+ test_util::GetTestFilePath("chromeos/drive/file_entry.json");
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<FileResource> file_resource;
@@ -491,7 +494,7 @@ TEST_F(DriveApiOperationsTest, TrashResourceOperation) {
// Set data for the expected result. Directory entry should be returned
// if the trashing entry is a directory, so using it here should be fine.
expected_data_file_path_ =
- test_util::GetTestFilePath("drive/directory_entry.json");
+ test_util::GetTestFilePath("chromeos/drive/directory_entry.json");
GDataErrorCode error = GDATA_OTHER_ERROR;
diff --git a/chrome/browser/google_apis/drive_api_parser_unittest.cc b/chrome/browser/google_apis/drive_api_parser_unittest.cc
index 53a0f7b..4597c80 100644
--- a/chrome/browser/google_apis/drive_api_parser_unittest.cc
+++ b/chrome/browser/google_apis/drive_api_parser_unittest.cc
@@ -29,7 +29,8 @@ namespace google_apis {
// Test about resource parsing.
TEST(DriveAPIParserTest, AboutResourceParser) {
std::string error;
- scoped_ptr<Value> document = test_util::LoadJSONFile("drive/about.json");
+ scoped_ptr<Value> document = test_util::LoadJSONFile(
+ "chromeos/drive/about.json");
ASSERT_TRUE(document.get());
ASSERT_EQ(Value::TYPE_DICTIONARY, document->GetType());
@@ -64,7 +65,8 @@ TEST(DriveAPIParserTest, AboutResourceFromAccountMetadata) {
// Test app list parsing.
TEST(DriveAPIParserTest, AppListParser) {
std::string error;
- scoped_ptr<Value> document = test_util::LoadJSONFile("drive/applist.json");
+ scoped_ptr<Value> document = test_util::LoadJSONFile(
+ "chromeos/drive/applist.json");
ASSERT_TRUE(document.get());
ASSERT_EQ(Value::TYPE_DICTIONARY, document->GetType());
@@ -241,7 +243,8 @@ TEST(DriveAPIParserTest, AppListFromAccountMetadata) {
// Test file list parsing.
TEST(DriveAPIParserTest, FileListParser) {
std::string error;
- scoped_ptr<Value> document = test_util::LoadJSONFile("drive/filelist.json");
+ scoped_ptr<Value> document = test_util::LoadJSONFile(
+ "chromeos/drive/filelist.json");
ASSERT_TRUE(document.get());
ASSERT_EQ(Value::TYPE_DICTIONARY, document->GetType());
@@ -346,7 +349,7 @@ TEST(DriveAPIParserTest, FileListParser) {
TEST(DriveAPIParserTest, ChangeListParser) {
std::string error;
scoped_ptr<Value> document =
- test_util::LoadJSONFile("drive/changelist.json");
+ test_util::LoadJSONFile("chromeos/drive/changelist.json");
ASSERT_TRUE(document.get());
ASSERT_EQ(Value::TYPE_DICTIONARY, document->GetType());
diff --git a/chrome/browser/google_apis/fake_drive_service_unittest.cc b/chrome/browser/google_apis/fake_drive_service_unittest.cc
index 971c674..83b9833 100644
--- a/chrome/browser/google_apis/fake_drive_service_unittest.cc
+++ b/chrome/browser/google_apis/fake_drive_service_unittest.cc
@@ -84,7 +84,8 @@ class FakeDriveServiceTest : public testing::Test {
};
TEST_F(FakeDriveServiceTest, GetResourceList_All) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<ResourceList> resource_list;
@@ -107,7 +108,8 @@ TEST_F(FakeDriveServiceTest, GetResourceList_All) {
}
TEST_F(FakeDriveServiceTest, GetResourceList_WithStartIndex) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<ResourceList> resource_list;
@@ -131,7 +133,8 @@ TEST_F(FakeDriveServiceTest, GetResourceList_WithStartIndex) {
}
TEST_F(FakeDriveServiceTest, GetResourceList_WithStartIndexAndMaxResults) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<ResourceList> resource_list;
@@ -161,7 +164,8 @@ TEST_F(FakeDriveServiceTest, GetResourceList_WithStartIndexAndMaxResults) {
}
TEST_F(FakeDriveServiceTest, GetResourceList_WithDefaultMaxResultsChanged) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
fake_service_.set_default_max_results(3);
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -192,7 +196,8 @@ TEST_F(FakeDriveServiceTest, GetResourceList_WithDefaultMaxResultsChanged) {
}
TEST_F(FakeDriveServiceTest, GetResourceList_InRootDirectory) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<ResourceList> resource_list;
@@ -215,7 +220,8 @@ TEST_F(FakeDriveServiceTest, GetResourceList_InRootDirectory) {
}
TEST_F(FakeDriveServiceTest, GetResourceList_Search) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<ResourceList> resource_list;
@@ -239,7 +245,8 @@ TEST_F(FakeDriveServiceTest, GetResourceList_Search) {
}
TEST_F(FakeDriveServiceTest, GetResourceList_SearchWithAttribute) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<ResourceList> resource_list;
@@ -263,7 +270,8 @@ TEST_F(FakeDriveServiceTest, GetResourceList_SearchWithAttribute) {
}
TEST_F(FakeDriveServiceTest, GetResourceList_SearchMultipleQueries) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<ResourceList> resource_list;
@@ -302,11 +310,12 @@ TEST_F(FakeDriveServiceTest, GetResourceList_SearchMultipleQueries) {
}
TEST_F(FakeDriveServiceTest, GetResourceList_NoNewEntries) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
// Load the account_metadata.json as well to add the largest changestamp
// (654321) to the existing entries.
ASSERT_TRUE(fake_service_.LoadAccountMetadataForWapi(
- "gdata/account_metadata.json"));
+ "chromeos/gdata/account_metadata.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<ResourceList> resource_list;
@@ -331,11 +340,12 @@ TEST_F(FakeDriveServiceTest, GetResourceList_NoNewEntries) {
}
TEST_F(FakeDriveServiceTest, GetResourceList_WithNewEntry) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
// Load the account_metadata.json as well to add the largest changestamp
// (654321) to the existing entries.
ASSERT_TRUE(fake_service_.LoadAccountMetadataForWapi(
- "gdata/account_metadata.json"));
+ "chromeos/gdata/account_metadata.json"));
// Add a new directory in the root directory. The new directory will have
// the changestamp of 654322.
ASSERT_TRUE(AddNewDirectory(
@@ -364,7 +374,8 @@ TEST_F(FakeDriveServiceTest, GetResourceList_WithNewEntry) {
}
TEST_F(FakeDriveServiceTest, GetResourceList_Offline) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
fake_service_.set_offline(true);
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -386,7 +397,7 @@ TEST_F(FakeDriveServiceTest, GetResourceList_Offline) {
TEST_F(FakeDriveServiceTest, GetAccountMetadata) {
ASSERT_TRUE(fake_service_.LoadAccountMetadataForWapi(
- "gdata/account_metadata.json"));
+ "chromeos/gdata/account_metadata.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<AccountMetadata> account_metadata;
@@ -406,7 +417,7 @@ TEST_F(FakeDriveServiceTest, GetAccountMetadata) {
TEST_F(FakeDriveServiceTest, GetAccountMetadata_Offline) {
ASSERT_TRUE(fake_service_.LoadAccountMetadataForWapi(
- "gdata/account_metadata.json"));
+ "chromeos/gdata/account_metadata.json"));
fake_service_.set_offline(true);
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -423,7 +434,7 @@ TEST_F(FakeDriveServiceTest, GetAccountMetadata_Offline) {
TEST_F(FakeDriveServiceTest, GetAboutResource) {
ASSERT_TRUE(fake_service_.LoadAccountMetadataForWapi(
- "gdata/account_metadata.json"));
+ "chromeos/gdata/account_metadata.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<AboutResource> about_resource;
@@ -443,7 +454,7 @@ TEST_F(FakeDriveServiceTest, GetAboutResource) {
TEST_F(FakeDriveServiceTest, GetAboutResource_Offline) {
ASSERT_TRUE(fake_service_.LoadAccountMetadataForWapi(
- "gdata/account_metadata.json"));
+ "chromeos/gdata/account_metadata.json"));
fake_service_.set_offline(true);
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -459,7 +470,7 @@ TEST_F(FakeDriveServiceTest, GetAboutResource_Offline) {
TEST_F(FakeDriveServiceTest, GetAppList) {
ASSERT_TRUE(fake_service_.LoadAppListForDriveApi(
- "drive/applist.json"));
+ "chromeos/drive/applist.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<AppList> app_list;
@@ -476,7 +487,7 @@ TEST_F(FakeDriveServiceTest, GetAppList) {
TEST_F(FakeDriveServiceTest, GetAppList_Offline) {
ASSERT_TRUE(fake_service_.LoadAppListForDriveApi(
- "drive/applist.json"));
+ "chromeos/drive/applist.json"));
fake_service_.set_offline(true);
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -492,7 +503,8 @@ TEST_F(FakeDriveServiceTest, GetAppList_Offline) {
}
TEST_F(FakeDriveServiceTest, GetResourceEntry_ExistingFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "file:2_file_resource_id";
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -511,7 +523,8 @@ TEST_F(FakeDriveServiceTest, GetResourceEntry_ExistingFile) {
}
TEST_F(FakeDriveServiceTest, GetResourceEntry_NonexistingFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "file:nonexisting_resource_id";
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -528,7 +541,8 @@ TEST_F(FakeDriveServiceTest, GetResourceEntry_NonexistingFile) {
}
TEST_F(FakeDriveServiceTest, GetResourceEntry_Offline) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
fake_service_.set_offline(true);
const std::string kResourceId = "file:2_file_resource_id";
@@ -546,7 +560,8 @@ TEST_F(FakeDriveServiceTest, GetResourceEntry_Offline) {
}
TEST_F(FakeDriveServiceTest, DeleteResource_ExistingFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
// Resource "file:2_file_resource_id" should now exist.
ASSERT_TRUE(Exists("file:2_file_resource_id"));
@@ -565,7 +580,8 @@ TEST_F(FakeDriveServiceTest, DeleteResource_ExistingFile) {
}
TEST_F(FakeDriveServiceTest, DeleteResource_NonexistingFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
fake_service_.DeleteResource(
@@ -579,7 +595,8 @@ TEST_F(FakeDriveServiceTest, DeleteResource_NonexistingFile) {
}
TEST_F(FakeDriveServiceTest, DeleteResource_Offline) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
fake_service_.set_offline(true);
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -594,7 +611,8 @@ TEST_F(FakeDriveServiceTest, DeleteResource_Offline) {
}
TEST_F(FakeDriveServiceTest, DownloadFile_ExistingFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
@@ -623,7 +641,8 @@ TEST_F(FakeDriveServiceTest, DownloadFile_ExistingFile) {
}
TEST_F(FakeDriveServiceTest, DownloadFile_NonexistingFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
@@ -647,7 +666,8 @@ TEST_F(FakeDriveServiceTest, DownloadFile_NonexistingFile) {
}
TEST_F(FakeDriveServiceTest, DownloadFile_Offline) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
fake_service_.set_offline(true);
base::ScopedTempDir temp_dir;
@@ -672,7 +692,8 @@ TEST_F(FakeDriveServiceTest, DownloadFile_Offline) {
}
TEST_F(FakeDriveServiceTest, CopyHostedDocument_ExistingHostedDocument) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "document:5_document_resource_id";
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -695,7 +716,8 @@ TEST_F(FakeDriveServiceTest, CopyHostedDocument_ExistingHostedDocument) {
}
TEST_F(FakeDriveServiceTest, CopyHostedDocument_NonexistingHostedDocument) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "document:nonexisting_resource_id";
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -712,7 +734,8 @@ TEST_F(FakeDriveServiceTest, CopyHostedDocument_NonexistingHostedDocument) {
}
TEST_F(FakeDriveServiceTest, CopyHostedDocument_ExistingRegularFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "file:2_file_resource_id";
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -731,7 +754,8 @@ TEST_F(FakeDriveServiceTest, CopyHostedDocument_ExistingRegularFile) {
}
TEST_F(FakeDriveServiceTest, CopyHostedDocument_Offline) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
fake_service_.set_offline(true);
const std::string kResourceId = "document:5_document_resource_id";
@@ -750,7 +774,8 @@ TEST_F(FakeDriveServiceTest, CopyHostedDocument_Offline) {
}
TEST_F(FakeDriveServiceTest, RenameResource_ExistingFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "file:2_file_resource_id";
@@ -772,7 +797,8 @@ TEST_F(FakeDriveServiceTest, RenameResource_ExistingFile) {
}
TEST_F(FakeDriveServiceTest, RenameResource_NonexistingFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "file:nonexisting_file";
@@ -788,7 +814,8 @@ TEST_F(FakeDriveServiceTest, RenameResource_NonexistingFile) {
}
TEST_F(FakeDriveServiceTest, RenameResource_Offline) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
fake_service_.set_offline(true);
const std::string kResourceId = "file:2_file_resource_id";
@@ -805,7 +832,8 @@ TEST_F(FakeDriveServiceTest, RenameResource_Offline) {
}
TEST_F(FakeDriveServiceTest, AddResourceToDirectory_FileInRootDirectory) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "file:2_file_resource_id";
const std::string kOldParentResourceId = fake_service_.GetRootResourceId();
@@ -833,7 +861,8 @@ TEST_F(FakeDriveServiceTest, AddResourceToDirectory_FileInRootDirectory) {
}
TEST_F(FakeDriveServiceTest, AddResourceToDirectory_FileInNonRootDirectory) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "file:subdirectory_file_1_id";
const std::string kOldParentResourceId = "folder:1_folder_resource_id";
@@ -861,7 +890,8 @@ TEST_F(FakeDriveServiceTest, AddResourceToDirectory_FileInNonRootDirectory) {
}
TEST_F(FakeDriveServiceTest, AddResourceToDirectory_NonexistingFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "file:nonexisting_file";
const std::string kNewParentResourceId = "folder:1_folder_resource_id";
@@ -878,7 +908,8 @@ TEST_F(FakeDriveServiceTest, AddResourceToDirectory_NonexistingFile) {
}
TEST_F(FakeDriveServiceTest, AddResourceToDirectory_OrphanFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "file:1_orphanfile_resource_id";
const std::string kNewParentResourceId = "folder:1_folder_resource_id";
@@ -905,7 +936,8 @@ TEST_F(FakeDriveServiceTest, AddResourceToDirectory_OrphanFile) {
}
TEST_F(FakeDriveServiceTest, AddResourceToDirectory_Offline) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
fake_service_.set_offline(true);
const std::string kResourceId = "file:2_file_resource_id";
@@ -923,7 +955,8 @@ TEST_F(FakeDriveServiceTest, AddResourceToDirectory_Offline) {
}
TEST_F(FakeDriveServiceTest, RemoveResourceFromDirectory_ExistingFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "file:subdirectory_file_1_id";
const std::string kParentResourceId = "folder:1_folder_resource_id";
@@ -955,7 +988,8 @@ TEST_F(FakeDriveServiceTest, RemoveResourceFromDirectory_ExistingFile) {
}
TEST_F(FakeDriveServiceTest, RemoveResourceFromDirectory_NonexistingFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "file:nonexisting_file";
const std::string kParentResourceId = "folder:1_folder_resource_id";
@@ -972,7 +1006,8 @@ TEST_F(FakeDriveServiceTest, RemoveResourceFromDirectory_NonexistingFile) {
}
TEST_F(FakeDriveServiceTest, RemoveResourceFromDirectory_OrphanFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kResourceId = "file:1_orphanfile_resource_id";
const std::string kParentResourceId = fake_service_.GetRootResourceId();
@@ -989,7 +1024,8 @@ TEST_F(FakeDriveServiceTest, RemoveResourceFromDirectory_OrphanFile) {
}
TEST_F(FakeDriveServiceTest, RemoveResourceFromDirectory_Offline) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
fake_service_.set_offline(true);
const std::string kResourceId = "file:subdirectory_file_1_id";
@@ -1007,7 +1043,8 @@ TEST_F(FakeDriveServiceTest, RemoveResourceFromDirectory_Offline) {
}
TEST_F(FakeDriveServiceTest, AddNewDirectory_ToRootDirectory) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<ResourceEntry> resource_entry;
@@ -1030,7 +1067,8 @@ TEST_F(FakeDriveServiceTest, AddNewDirectory_ToRootDirectory) {
}
TEST_F(FakeDriveServiceTest, AddNewDirectory_ToRootDirectoryOnEmptyFileSystem) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/empty_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/empty_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
scoped_ptr<ResourceEntry> resource_entry;
@@ -1053,7 +1091,8 @@ TEST_F(FakeDriveServiceTest, AddNewDirectory_ToRootDirectoryOnEmptyFileSystem) {
}
TEST_F(FakeDriveServiceTest, AddNewDirectory_ToNonRootDirectory) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kParentResourceId = "folder:1_folder_resource_id";
@@ -1077,7 +1116,8 @@ TEST_F(FakeDriveServiceTest, AddNewDirectory_ToNonRootDirectory) {
}
TEST_F(FakeDriveServiceTest, AddNewDirectory_ToNonexistingDirectory) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
const std::string kParentResourceId = "folder:nonexisting_resource_id";
@@ -1096,7 +1136,8 @@ TEST_F(FakeDriveServiceTest, AddNewDirectory_ToNonexistingDirectory) {
}
TEST_F(FakeDriveServiceTest, AddNewDirectory_Offline) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
fake_service_.set_offline(true);
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -1114,7 +1155,8 @@ TEST_F(FakeDriveServiceTest, AddNewDirectory_Offline) {
}
TEST_F(FakeDriveServiceTest, InitiateUploadNewFile_Offline) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
fake_service_.set_offline(true);
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -1135,7 +1177,8 @@ TEST_F(FakeDriveServiceTest, InitiateUploadNewFile_Offline) {
}
TEST_F(FakeDriveServiceTest, InitiateUploadNewFile_NotFound) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
GURL upload_location;
@@ -1155,7 +1198,8 @@ TEST_F(FakeDriveServiceTest, InitiateUploadNewFile_NotFound) {
}
TEST_F(FakeDriveServiceTest, InitiateUploadNewFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
GURL upload_location;
@@ -1177,7 +1221,8 @@ TEST_F(FakeDriveServiceTest, InitiateUploadNewFile) {
}
TEST_F(FakeDriveServiceTest, InitiateUploadExistingFile_Offline) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
fake_service_.set_offline(true);
GDataErrorCode error = GDATA_OTHER_ERROR;
@@ -1198,7 +1243,8 @@ TEST_F(FakeDriveServiceTest, InitiateUploadExistingFile_Offline) {
}
TEST_F(FakeDriveServiceTest, InitiateUploadExistingFile_NotFound) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
GURL upload_location;
@@ -1218,7 +1264,8 @@ TEST_F(FakeDriveServiceTest, InitiateUploadExistingFile_NotFound) {
}
TEST_F(FakeDriveServiceTest, InitiateUploadExistingFile_WrongETag) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
GURL upload_location;
@@ -1238,7 +1285,8 @@ TEST_F(FakeDriveServiceTest, InitiateUploadExistingFile_WrongETag) {
}
TEST_F(FakeDriveServiceTest, InitiateUpload_ExistingFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
GURL upload_location;
@@ -1259,7 +1307,8 @@ TEST_F(FakeDriveServiceTest, InitiateUpload_ExistingFile) {
}
TEST_F(FakeDriveServiceTest, ResumeUpload_Offline) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
GURL upload_location;
@@ -1298,7 +1347,8 @@ TEST_F(FakeDriveServiceTest, ResumeUpload_Offline) {
}
TEST_F(FakeDriveServiceTest, ResumeUpload_NotFound) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
GURL upload_location;
@@ -1332,7 +1382,8 @@ TEST_F(FakeDriveServiceTest, ResumeUpload_NotFound) {
}
TEST_F(FakeDriveServiceTest, ResumeUpload_ExistingFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
GURL upload_location;
@@ -1381,7 +1432,8 @@ TEST_F(FakeDriveServiceTest, ResumeUpload_ExistingFile) {
}
TEST_F(FakeDriveServiceTest, ResumeUpload_NewFile) {
- ASSERT_TRUE(fake_service_.LoadResourceListForWapi("gdata/root_feed.json"));
+ ASSERT_TRUE(fake_service_.LoadResourceListForWapi(
+ "chromeos/gdata/root_feed.json"));
GDataErrorCode error = GDATA_OTHER_ERROR;
GURL upload_location;
diff --git a/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc b/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc
index 5f7c1a2..4d7b3c3 100644
--- a/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc
+++ b/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc
@@ -108,7 +108,7 @@ class GDataWapiOperationsTest : public testing::Test {
// TODO(satorux): we should generate valid JSON data for the newly
// copied document but for now, just return "file_entry.json"
return test_util::CreateHttpResponseFromFile(
- test_util::GetTestFilePath("gdata/file_entry.json"));
+ test_util::GetTestFilePath("chromeos/gdata/file_entry.json"));
}
if (!test_util::RemovePrefix(absolute_url.path(),
@@ -120,7 +120,7 @@ class GDataWapiOperationsTest : public testing::Test {
if (remaining_path == "-/mine") {
// Process the default feed.
return test_util::CreateHttpResponseFromFile(
- test_util::GetTestFilePath("gdata/root_feed.json"));
+ test_util::GetTestFilePath("chromeos/gdata/root_feed.json"));
} else {
// Process a feed for a single resource ID.
const std::string resource_id = net::UnescapeURLComponent(
@@ -130,18 +130,18 @@ class GDataWapiOperationsTest : public testing::Test {
if (request.method == test_server::METHOD_PUT &&
request.content.find("<docs:authorizedApp>") != std::string::npos) {
return test_util::CreateHttpResponseFromFile(
- test_util::GetTestFilePath("gdata/basic_feed.json"));
+ test_util::GetTestFilePath("chromeos/gdata/basic_feed.json"));
}
return test_util::CreateHttpResponseFromFile(
- test_util::GetTestFilePath("gdata/file_entry.json"));
+ test_util::GetTestFilePath("chromeos/gdata/file_entry.json"));
} else if (resource_id == "folder:root/contents" &&
request.method == test_server::METHOD_POST) {
// This is a request for creating a directory in the root directory.
// TODO(satorux): we should generate valid JSON data for the newly
// created directory but for now, just return "directory_entry.json"
return test_util::CreateHttpResponseFromFile(
- test_util::GetTestFilePath("gdata/directory_entry.json"));
+ test_util::GetTestFilePath("chromeos/gdata/directory_entry.json"));
} else if (resource_id ==
"folder:root/contents/file:2_file_resource_id" &&
request.method == test_server::METHOD_DELETE) {
@@ -150,7 +150,7 @@ class GDataWapiOperationsTest : public testing::Test {
// copy it. For now, just return a random file, as the contents don't
// matter.
return test_util::CreateHttpResponseFromFile(
- test_util::GetTestFilePath("gdata/testfile.txt"));
+ test_util::GetTestFilePath("chromeos/gdata/testfile.txt"));
}
}
@@ -168,7 +168,8 @@ class GDataWapiOperationsTest : public testing::Test {
scoped_ptr<test_server::HttpResponse> result(
test_util::CreateHttpResponseFromFile(
- test_util::GetTestFilePath("gdata/account_metadata.json")));
+ test_util::GetTestFilePath(
+ "chromeos/gdata/account_metadata.json")));
if (absolute_url.query().find("include-installed-apps=true") ==
string::npos) {
// Exclude the list of installed apps.
@@ -254,7 +255,7 @@ class GDataWapiOperationsTest : public testing::Test {
// file, but for now, just return file_entry.json.
scoped_ptr<test_server::HttpResponse> response =
test_util::CreateHttpResponseFromFile(
- test_util::GetTestFilePath("gdata/file_entry.json"));
+ test_util::GetTestFilePath("chromeos/gdata/file_entry.json"));
// response.code() is set to SUCCESS. Change it to CREATED if it's a new
// file.
if (absolute_url.path() == "/upload_new_file")
@@ -350,7 +351,7 @@ TEST_F(GDataWapiOperationsTest, GetResourceListOperation_DefaultFeed) {
"&max-results=500&include-installed-apps=true",
http_request_.relative_url);
EXPECT_TRUE(test_util::VerifyJsonData(
- test_util::GetTestFilePath("gdata/root_feed.json"),
+ test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
result_data.get()));
}
@@ -362,7 +363,7 @@ TEST_F(GDataWapiOperationsTest, GetResourceListOperation_ValidFeed) {
&operation_registry_,
request_context_getter_.get(),
*url_generator_,
- test_server_.GetURL("/files/gdata/root_feed.json"),
+ test_server_.GetURL("/files/chromeos/gdata/root_feed.json"),
0, // start changestamp
"", // search string
false, // shared with me
@@ -376,11 +377,11 @@ TEST_F(GDataWapiOperationsTest, GetResourceListOperation_ValidFeed) {
EXPECT_EQ(HTTP_SUCCESS, result_code);
EXPECT_EQ(test_server::METHOD_GET, http_request_.method);
- EXPECT_EQ("/files/gdata/root_feed.json?v=3&alt=json&showfolders=true"
+ EXPECT_EQ("/files/chromeos/gdata/root_feed.json?v=3&alt=json&showfolders=true"
"&max-results=500&include-installed-apps=true",
http_request_.relative_url);
EXPECT_TRUE(test_util::VerifyJsonData(
- test_util::GetTestFilePath("gdata/root_feed.json"),
+ test_util::GetTestFilePath("chromeos/gdata/root_feed.json"),
result_data.get()));
}
@@ -394,7 +395,7 @@ TEST_F(GDataWapiOperationsTest, GetResourceListOperation_InvalidFeed) {
&operation_registry_,
request_context_getter_.get(),
*url_generator_,
- test_server_.GetURL("/files/gdata/testfile.txt"),
+ test_server_.GetURL("/files/chromeos/gdata/testfile.txt"),
0, // start changestamp
"", // search string
false, // shared with me
@@ -408,7 +409,7 @@ TEST_F(GDataWapiOperationsTest, GetResourceListOperation_InvalidFeed) {
EXPECT_EQ(GDATA_PARSE_ERROR, result_code);
EXPECT_EQ(test_server::METHOD_GET, http_request_.method);
- EXPECT_EQ("/files/gdata/testfile.txt?v=3&alt=json&showfolders=true"
+ EXPECT_EQ("/files/chromeos/gdata/testfile.txt?v=3&alt=json&showfolders=true"
"&max-results=500&include-installed-apps=true",
http_request_.relative_url);
EXPECT_FALSE(result_data);
@@ -436,7 +437,7 @@ TEST_F(GDataWapiOperationsTest, GetResourceEntryOperation_ValidResourceId) {
"?v=3&alt=json",
http_request_.relative_url);
EXPECT_TRUE(test_util::VerifyJsonData(
- test_util::GetTestFilePath("gdata/file_entry.json"),
+ test_util::GetTestFilePath("chromeos/gdata/file_entry.json"),
result_data.get()));
}
@@ -485,7 +486,7 @@ TEST_F(GDataWapiOperationsTest, GetAccountMetadataOperation) {
scoped_ptr<AccountMetadata> expected(
AccountMetadata::CreateFrom(
- *test_util::LoadJSONFile("gdata/account_metadata.json")));
+ *test_util::LoadJSONFile("chromeos/gdata/account_metadata.json")));
ASSERT_TRUE(result_data.get());
EXPECT_EQ(expected->largest_changestamp(),
@@ -523,7 +524,7 @@ TEST_F(GDataWapiOperationsTest,
scoped_ptr<AccountMetadata> expected(
AccountMetadata::CreateFrom(
- *test_util::LoadJSONFile("gdata/account_metadata.json")));
+ *test_util::LoadJSONFile("chromeos/gdata/account_metadata.json")));
ASSERT_TRUE(result_data.get());
EXPECT_EQ(expected->largest_changestamp(),
@@ -733,7 +734,7 @@ TEST_F(GDataWapiOperationsTest, AuthorizeAppOperation_InvalidFeed) {
base::Bind(&test_util::CopyResultsFromGetDataCallbackAndQuit,
&result_code,
&result_data),
- test_server_.GetURL("/files/gdata/testfile.txt"),
+ test_server_.GetURL("/files/chromeos/gdata/testfile.txt"),
"APP_ID");
operation->Start(kTestGDataAuthToken, kTestUserAgent,
@@ -742,7 +743,7 @@ TEST_F(GDataWapiOperationsTest, AuthorizeAppOperation_InvalidFeed) {
EXPECT_EQ(GDATA_PARSE_ERROR, result_code);
EXPECT_EQ(test_server::METHOD_PUT, http_request_.method);
- EXPECT_EQ("/files/gdata/testfile.txt?v=3&alt=json",
+ EXPECT_EQ("/files/chromeos/gdata/testfile.txt?v=3&alt=json",
http_request_.relative_url);
EXPECT_EQ("application/atom+xml", http_request_.headers["Content-Type"]);
EXPECT_EQ("*", http_request_.headers["If-Match"]);
diff --git a/chrome/browser/google_apis/gdata_wapi_parser_unittest.cc b/chrome/browser/google_apis/gdata_wapi_parser_unittest.cc
index 67c1fe3..f85d325 100644
--- a/chrome/browser/google_apis/gdata_wapi_parser_unittest.cc
+++ b/chrome/browser/google_apis/gdata_wapi_parser_unittest.cc
@@ -30,7 +30,7 @@ namespace google_apis {
TEST(GDataWAPIParserTest, ResourceListJsonParser) {
std::string error;
scoped_ptr<Value> document =
- test_util::LoadJSONFile("gdata/basic_feed.json");
+ test_util::LoadJSONFile("chromeos/gdata/basic_feed.json");
ASSERT_TRUE(document.get());
ASSERT_EQ(Value::TYPE_DICTIONARY, document->GetType());
scoped_ptr<ResourceList> feed(ResourceList::ExtractAndParse(*document));
@@ -159,7 +159,7 @@ TEST(GDataWAPIParserTest, ResourceListJsonParser) {
TEST(GDataWAPIParserTest, ResourceEntryJsonParser) {
std::string error;
scoped_ptr<Value> document =
- test_util::LoadJSONFile("gdata/file_entry.json");
+ test_util::LoadJSONFile("chromeos/gdata/file_entry.json");
ASSERT_TRUE(document.get());
ASSERT_EQ(Value::TYPE_DICTIONARY, document->GetType());
scoped_ptr<ResourceEntry> entry(ResourceEntry::ExtractAndParse(*document));
@@ -240,7 +240,7 @@ TEST(GDataWAPIParserTest, ResourceEntryJsonParser) {
TEST(GDataWAPIParserTest, AccountMetadataParser) {
scoped_ptr<Value> document =
- test_util::LoadJSONFile("gdata/account_metadata.json");
+ test_util::LoadJSONFile("chromeos/gdata/account_metadata.json");
ASSERT_TRUE(document.get());
ASSERT_EQ(Value::TYPE_DICTIONARY, document->GetType());
DictionaryValue* entry_value = NULL;
diff --git a/chrome/browser/google_apis/test_util.cc b/chrome/browser/google_apis/test_util.cc
index 11feb40..b93f1f7 100644
--- a/chrome/browser/google_apis/test_util.cc
+++ b/chrome/browser/google_apis/test_util.cc
@@ -64,7 +64,6 @@ base::FilePath GetTestFilePath(const std::string& relative_path) {
path = path.AppendASCII("chrome")
.AppendASCII("test")
.AppendASCII("data")
- .AppendASCII("chromeos")
.Append(base::FilePath::FromUTF8Unsafe(relative_path));
return path;
}
diff --git a/chrome/browser/google_apis/test_util.h b/chrome/browser/google_apis/test_util.h
index d482793..d76f360 100644
--- a/chrome/browser/google_apis/test_util.h
+++ b/chrome/browser/google_apis/test_util.h
@@ -50,7 +50,7 @@ bool RemovePrefix(const std::string& input,
std::string* output);
// Returns the absolute path for a test file stored under
-// chrome/test/data/chromeos.
+// chrome/test/data.
base::FilePath GetTestFilePath(const std::string& relative_path);
// Returns the base URL for communicating with the local test server for
@@ -58,7 +58,7 @@ base::FilePath GetTestFilePath(const std::string& relative_path);
GURL GetBaseUrlForTesting(int port);
// Loads a test JSON file as a base::Value, from a test file stored under
-// chrome/test/data/chromeos.
+// chrome/test/data.
scoped_ptr<base::Value> LoadJSONFile(const std::string& relative_path);
// Copies the results from EntryActionCallback.
diff --git a/chrome/browser/sync_file_system/drive_file_sync_client_unittest.cc b/chrome/browser/sync_file_system/drive_file_sync_client_unittest.cc
index 4d9f6c2..183dc41 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_client_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_file_sync_client_unittest.cc
@@ -47,7 +47,7 @@ class FakeDriveUploader : public google_apis::DriveUploaderInterface {
// DriveUploaderInterface overrides.
// Pretends that a new file was uploaded successfully, and returns the
- // contents of "gdata/file_entry.json" to the caller.
+ // contents of "chromeos/gdata/file_entry.json" to the caller.
virtual void UploadNewFile(
const std::string& parent_resource_id,
const base::FilePath& drive_file_path,
@@ -58,7 +58,7 @@ class FakeDriveUploader : public google_apis::DriveUploaderInterface {
DCHECK(!callback.is_null());
scoped_ptr<base::Value> file_entry_data(
- LoadJSONFile("gdata/file_entry.json").Pass());
+ LoadJSONFile("chromeos/gdata/file_entry.json").Pass());
scoped_ptr<ResourceEntry> file_entry(
ResourceEntry::ExtractAndParse(*file_entry_data));
@@ -72,8 +72,8 @@ class FakeDriveUploader : public google_apis::DriveUploaderInterface {
}
// Pretends that an existing file ("file:resource_id") was uploaded
- // successfully, and returns the contents of "gdata/file_entry.json" to the
- // caller.
+ // successfully, and returns the contents of "chromeos/gdata/file_entry.json"
+ // to the caller.
virtual void UploadExistingFile(
const std::string& resource_id,
const base::FilePath& drive_file_path,
@@ -84,7 +84,7 @@ class FakeDriveUploader : public google_apis::DriveUploaderInterface {
DCHECK(!callback.is_null());
scoped_ptr<base::Value> file_entry_data(
- LoadJSONFile("gdata/file_entry.json").Pass());
+ LoadJSONFile("chromeos/gdata/file_entry.json").Pass());
scoped_ptr<ResourceEntry> file_entry(
ResourceEntry::ExtractAndParse(*file_entry_data));
@@ -271,7 +271,7 @@ TEST_F(DriveFileSyncClientTest, GetSyncRoot) {
const std::string kRootResourceId = "folder:root";
const std::string kSyncRootResourceId = "folder:sync_root_resource_id";
scoped_ptr<base::Value> found_result_value(
- LoadJSONFile("sync_file_system/sync_root_found.json").Pass());
+ LoadJSONFile("chromeos/sync_file_system/sync_root_found.json").Pass());
scoped_ptr<google_apis::ResourceList> found_result =
google_apis::ResourceList::ExtractAndParse(*found_result_value);
@@ -312,16 +312,16 @@ TEST_F(DriveFileSyncClientTest, CreateSyncRoot) {
const std::string kRootResourceId = "folder:root";
const std::string kSyncRootResourceId = "folder:sync_root_resource_id";
scoped_ptr<base::Value> not_found_result_value =
- LoadJSONFile("sync_file_system/sync_root_not_found.json").Pass();
+ LoadJSONFile("chromeos/sync_file_system/sync_root_not_found.json").Pass();
scoped_ptr<google_apis::ResourceList> not_found_result =
google_apis::ResourceList::ExtractAndParse(*not_found_result_value);
scoped_ptr<base::Value> found_result_value =
- LoadJSONFile("sync_file_system/sync_root_found.json").Pass();
+ LoadJSONFile("chromeos/sync_file_system/sync_root_found.json").Pass();
scoped_ptr<google_apis::ResourceList> found_result =
google_apis::ResourceList::ExtractAndParse(*found_result_value);
scoped_ptr<base::Value> created_result_value =
- LoadJSONFile("sync_file_system/sync_root_created.json").Pass();
+ LoadJSONFile("chromeos/sync_file_system/sync_root_created.json").Pass();
scoped_ptr<google_apis::ResourceEntry> created_result =
google_apis::ResourceEntry::ExtractAndParse(*created_result_value);
@@ -376,16 +376,17 @@ TEST_F(DriveFileSyncClientTest, CreateSyncRoot_Conflict) {
const std::string kRootResourceId = "folder:root";
const std::string kSyncRootResourceId = "folder:sync_root_resource_id";
scoped_ptr<base::Value> not_found_result_value =
- LoadJSONFile("sync_file_system/sync_root_not_found.json").Pass();
+ LoadJSONFile("chromeos/sync_file_system/sync_root_not_found.json").Pass();
scoped_ptr<google_apis::ResourceList> not_found_result =
google_apis::ResourceList::ExtractAndParse(*not_found_result_value);
scoped_ptr<base::Value> duplicated_result_value =
- LoadJSONFile("sync_file_system/sync_root_duplicated.json").Pass();
+ LoadJSONFile(
+ "chromeos/sync_file_system/sync_root_duplicated.json").Pass();
scoped_ptr<google_apis::ResourceList> duplicated_result =
google_apis::ResourceList::ExtractAndParse(*duplicated_result_value);
scoped_ptr<base::Value> created_result_value =
- LoadJSONFile("sync_file_system/sync_root_created.json").Pass();
+ LoadJSONFile("chromeos/sync_file_system/sync_root_created.json").Pass();
scoped_ptr<google_apis::ResourceEntry> created_result =
google_apis::ResourceEntry::ExtractAndParse(*created_result_value);
@@ -449,7 +450,8 @@ TEST_F(DriveFileSyncClientTest, GetOriginDirectory) {
const GURL kOrigin("chrome-extension://example");
scoped_ptr<base::Value> found_result_value(
- LoadJSONFile("sync_file_system/origin_directory_found.json").Pass());
+ LoadJSONFile(
+ "chromeos/sync_file_system/origin_directory_found.json").Pass());
scoped_ptr<google_apis::ResourceList> found_result =
google_apis::ResourceList::ExtractAndParse(*found_result_value);
@@ -483,20 +485,24 @@ TEST_F(DriveFileSyncClientTest, CreateOriginDirectory) {
const GURL kOrigin("chrome-extension://example");
scoped_ptr<base::Value> not_found_result_value(
- LoadJSONFile("sync_file_system/origin_directory_not_found.json").Pass());
+ LoadJSONFile(
+ "chromeos/sync_file_system/origin_directory_not_found.json").Pass());
scoped_ptr<google_apis::ResourceList> not_found_result =
google_apis::ResourceList::ExtractAndParse(*not_found_result_value);
scoped_ptr<base::Value> found_result_value(
- LoadJSONFile("sync_file_system/origin_directory_found.json").Pass());
+ LoadJSONFile(
+ "chromeos/sync_file_system/origin_directory_found.json").Pass());
scoped_ptr<google_apis::ResourceList> found_result =
google_apis::ResourceList::ExtractAndParse(*found_result_value);
scoped_ptr<base::Value> got_parent_result_value(
- LoadJSONFile("sync_file_system/origin_directory_get_parent.json").Pass());
+ LoadJSONFile(
+ "chromeos/sync_file_system/origin_directory_get_parent.json").Pass());
scoped_ptr<google_apis::ResourceEntry> got_parent_result
= google_apis::ResourceEntry::ExtractAndParse(*got_parent_result_value);
scoped_ptr<base::Value> created_result_value(
- LoadJSONFile("sync_file_system/origin_directory_created.json").Pass());
+ LoadJSONFile(
+ "chromeos/sync_file_system/origin_directory_created.json").Pass());
scoped_ptr<google_apis::ResourceEntry> created_result =
google_apis::ResourceEntry::ExtractAndParse(*created_result_value);
@@ -540,20 +546,24 @@ TEST_F(DriveFileSyncClientTest, CreateOriginDirectory_Conflict) {
const GURL kOrigin("chrome-extension://example");
scoped_ptr<base::Value> not_found_result_value(
- LoadJSONFile("sync_file_system/origin_directory_not_found.json").Pass());
+ LoadJSONFile(
+ "chromeos/sync_file_system/origin_directory_not_found.json").Pass());
scoped_ptr<google_apis::ResourceList> not_found_result =
google_apis::ResourceList::ExtractAndParse(*not_found_result_value);
scoped_ptr<base::Value> duplicated_result_value(
- LoadJSONFile("sync_file_system/origin_directory_duplicated.json").Pass());
+ LoadJSONFile(
+ "chromeos/sync_file_system/origin_directory_duplicated.json").Pass());
scoped_ptr<google_apis::ResourceList> duplicated_result =
google_apis::ResourceList::ExtractAndParse(*duplicated_result_value);
scoped_ptr<base::Value> got_parent_result_value(
- LoadJSONFile("sync_file_system/origin_directory_get_parent.json").Pass());
+ LoadJSONFile(
+ "chromeos/sync_file_system/origin_directory_get_parent.json").Pass());
scoped_ptr<google_apis::ResourceEntry> got_parent_result
= google_apis::ResourceEntry::ExtractAndParse(*got_parent_result_value);
scoped_ptr<base::Value> created_result_value(
- LoadJSONFile("sync_file_system/origin_directory_created.json").Pass());
+ LoadJSONFile(
+ "chromeos/sync_file_system/origin_directory_created.json").Pass());
scoped_ptr<google_apis::ResourceEntry> created_result =
google_apis::ResourceEntry::ExtractAndParse(*created_result_value);
@@ -602,7 +612,7 @@ TEST_F(DriveFileSyncClientTest, CreateOriginDirectory_Conflict) {
TEST_F(DriveFileSyncClientTest, GetLargestChangeStamp) {
scoped_ptr<base::Value> result(
- LoadJSONFile("sync_file_system/account_metadata.json").Pass());
+ LoadJSONFile("chromeos/sync_file_system/account_metadata.json").Pass());
scoped_ptr<google_apis::AboutResource> about_resource(
google_apis::AboutResource::CreateFromAccountMetadata(
*google_apis::AccountMetadata::CreateFrom(*result),
@@ -634,12 +644,14 @@ TEST_F(DriveFileSyncClientTest, ListFiles) {
const GURL kFeedURL("listing_files_in_directory_first_page.json");
scoped_ptr<base::Value> first_result_value(
- LoadJSONFile("sync_file_system/listing_files_in_directory.json").Pass());
+ LoadJSONFile(
+ "chromeos/sync_file_system/listing_files_in_directory.json").Pass());
scoped_ptr<google_apis::ResourceList> first_result =
google_apis::ResourceList::ExtractAndParse(*first_result_value);
scoped_ptr<base::Value> following_result_value(LoadJSONFile(
- "sync_file_system/listing_files_in_directory_second_page.json").Pass());
+ "chromeos/sync_file_system/listing_files_in_directory_second_page.json"
+ ).Pass());
scoped_ptr<google_apis::ResourceList> following_result =
google_apis::ResourceList::ExtractAndParse(*following_result_value);
@@ -702,11 +714,13 @@ TEST_F(DriveFileSyncClientTest, ListChanges) {
const int64 kStartChangestamp = 123456;
scoped_ptr<base::Value> first_result_value(
- LoadJSONFile("sync_file_system/listing_files_in_directory.json").Pass());
+ LoadJSONFile(
+ "chromeos/sync_file_system/listing_files_in_directory.json").Pass());
scoped_ptr<google_apis::ResourceList> first_result =
google_apis::ResourceList::ExtractAndParse(*first_result_value);
scoped_ptr<base::Value> following_result_value(LoadJSONFile(
- "sync_file_system/listing_changed_files_in_directory.json").Pass());
+ "chromeos/sync_file_system/listing_changed_files_in_directory.json"
+ ).Pass());
scoped_ptr<google_apis::ResourceList> following_result =
google_apis::ResourceList::ExtractAndParse(*following_result_value);
@@ -769,7 +783,7 @@ TEST_F(DriveFileSyncClientTest, DownloadFile) {
const base::FilePath kLocalFilePath(FPL("/tmp/dir/file"));
scoped_ptr<base::Value> file_entry_data(
- LoadJSONFile("gdata/file_entry.json").Pass());
+ LoadJSONFile("chromeos/gdata/file_entry.json").Pass());
scoped_ptr<ResourceEntry> file_entry(
ResourceEntry::ExtractAndParse(*file_entry_data));
// We need another copy as |file_entry| will be passed to
@@ -817,7 +831,7 @@ TEST_F(DriveFileSyncClientTest, DownloadFileInNotModified) {
const base::FilePath kLocalFilePath(FPL("/tmp/dir/file"));
scoped_ptr<base::Value> file_entry_data(
- LoadJSONFile("gdata/file_entry.json").Pass());
+ LoadJSONFile("chromeos/gdata/file_entry.json").Pass());
scoped_ptr<ResourceEntry> file_entry(
ResourceEntry::ExtractAndParse(*file_entry_data));
// We need another copy as |file_entry| will be passed to
@@ -859,7 +873,8 @@ TEST_F(DriveFileSyncClientTest, UploadNewFile) {
const std::string kTitle("testfile");
scoped_ptr<base::Value> verifying_file_found_data(
- LoadJSONFile("sync_file_system/verifing_file_found.json").Pass());
+ LoadJSONFile(
+ "chromeos/sync_file_system/verifing_file_found.json").Pass());
scoped_ptr<ResourceList> verifying_file_found(
ResourceList::ExtractAndParse(*verifying_file_found_data));
@@ -895,7 +910,7 @@ TEST_F(DriveFileSyncClientTest, UploadExistingFile) {
const base::FilePath kLocalFilePath(FPL("/tmp/dir/file"));
scoped_ptr<base::Value> file_entry_data(
- LoadJSONFile("gdata/file_entry.json").Pass());
+ LoadJSONFile("chromeos/gdata/file_entry.json").Pass());
scoped_ptr<ResourceEntry> file_entry(
ResourceEntry::ExtractAndParse(*file_entry_data));
const std::string expected_remote_file_md5 = file_entry->file_md5();
@@ -936,7 +951,7 @@ TEST_F(DriveFileSyncClientTest, UploadExistingFileInConflict) {
const std::string kExpectedRemoteFileMD5 = "123456";
scoped_ptr<base::Value> file_entry_data(
- LoadJSONFile("gdata/file_entry.json").Pass());
+ LoadJSONFile("chromeos/gdata/file_entry.json").Pass());
scoped_ptr<ResourceEntry> file_entry(
ResourceEntry::ExtractAndParse(*file_entry_data));
@@ -969,7 +984,7 @@ TEST_F(DriveFileSyncClientTest, DeleteFile) {
const std::string kResourceId = "file:2_file_resource_id";
scoped_ptr<base::Value> file_entry_data(
- LoadJSONFile("gdata/file_entry.json").Pass());
+ LoadJSONFile("chromeos/gdata/file_entry.json").Pass());
scoped_ptr<ResourceEntry> file_entry(
ResourceEntry::ExtractAndParse(*file_entry_data));
// Keep the copy of MD5 hash, because file_entry will be passed to
@@ -1012,7 +1027,7 @@ TEST_F(DriveFileSyncClientTest, DeleteFileInConflict) {
const std::string kExpectedRemoteFileMD5 = "123456";
scoped_ptr<base::Value> file_entry_data(
- LoadJSONFile("gdata/file_entry.json").Pass());
+ LoadJSONFile("chromeos/gdata/file_entry.json").Pass());
scoped_ptr<ResourceEntry> file_entry(
ResourceEntry::ExtractAndParse(*file_entry_data));
diff --git a/chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc b/chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc
index ac8b2a5..6f22ee3 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc
@@ -479,14 +479,14 @@ class DriveFileSyncServiceMockTest : public testing::Test {
void SetUpDriveServiceExpectCallsForGetSyncRoot() {
SetUpDriveServiceExpectCallsForGetResourceList(
- "sync_file_system/sync_root_found.json",
+ "chromeos/sync_file_system/sync_root_found.json",
FormatTitleQuery(kSyncRootDirectoryName),
std::string());
}
void SetUpDriveServiceExpectCallsForGetAboutResource() {
scoped_ptr<Value> account_metadata_value(LoadJSONFile(
- "gdata/account_metadata.json"));
+ "chromeos/gdata/account_metadata.json"));
scoped_ptr<google_apis::AboutResource> about_resource(
google_apis::AboutResource::CreateFromAccountMetadata(
*google_apis::AccountMetadata::CreateFrom(*account_metadata_value),
@@ -501,7 +501,7 @@ class DriveFileSyncServiceMockTest : public testing::Test {
void SetUpDriveServiceExpectCallsForDownloadFile(
const std::string& file_resource_id) {
scoped_ptr<Value> file_entry_value(
- LoadJSONFile("gdata/file_entry.json").Pass());
+ LoadJSONFile("chromeos/gdata/file_entry.json").Pass());
scoped_ptr<google_apis::ResourceEntry> file_entry
= google_apis::ResourceEntry::ExtractAndParse(*file_entry_value);
EXPECT_CALL(*mock_drive_service(),
@@ -521,7 +521,7 @@ class DriveFileSyncServiceMockTest : public testing::Test {
const std::string& parent_directory,
const std::string& directory_name) {
scoped_ptr<Value> origin_directory_created_value(LoadJSONFile(
- "sync_file_system/origin_directory_created.json"));
+ "chromeos/sync_file_system/origin_directory_created.json"));
scoped_ptr<google_apis::ResourceEntry> origin_directory_created
= google_apis::ResourceEntry::ExtractAndParse(
*origin_directory_created_value);
@@ -604,7 +604,7 @@ TEST_F(DriveFileSyncServiceMockTest, BatchSyncOnInitialization) {
SetUpDriveServiceExpectCallsForGetAboutResource();
SetUpDriveServiceExpectCallsForGetResourceList(
- "sync_file_system/listing_files_in_directory.json",
+ "chromeos/sync_file_system/listing_files_in_directory.json",
std::string(),
kDirectoryResourceId1);
@@ -639,11 +639,11 @@ TEST_F(DriveFileSyncServiceMockTest, RegisterNewOrigin) {
.Times(AnyNumber());
SetUpDriveServiceExpectCallsForGetResourceList(
- "sync_file_system/origin_directory_found.json",
+ "chromeos/sync_file_system/origin_directory_found.json",
FormatTitleQuery(DriveFileSyncClient::OriginToDirectoryTitle(kOrigin)),
kSyncRootResourceId);
SetUpDriveServiceExpectCallsForGetResourceList(
- "sync_file_system/origin_directory_not_found.json",
+ "chromeos/sync_file_system/origin_directory_not_found.json",
FormatTitleQuery(DriveFileSyncClient::OriginToDirectoryTitle(kOrigin)),
kSyncRootResourceId);
@@ -658,7 +658,7 @@ TEST_F(DriveFileSyncServiceMockTest, RegisterNewOrigin) {
SetUpDriveServiceExpectCallsForGetAboutResource();
SetUpDriveServiceExpectCallsForGetResourceList(
- "sync_file_system/listing_files_in_empty_directory.json",
+ "chromeos/sync_file_system/listing_files_in_empty_directory.json",
std::string(),
kDirectoryResourceId);
@@ -691,7 +691,7 @@ TEST_F(DriveFileSyncServiceMockTest, RegisterExistingOrigin) {
// We already have a directory for the origin.
SetUpDriveServiceExpectCallsForGetResourceList(
- "sync_file_system/origin_directory_found.json",
+ "chromeos/sync_file_system/origin_directory_found.json",
FormatTitleQuery(DriveFileSyncClient::OriginToDirectoryTitle(kOrigin)),
kSyncRootResourceId);
@@ -700,7 +700,7 @@ TEST_F(DriveFileSyncServiceMockTest, RegisterExistingOrigin) {
// DriveFileSyncService should fetch the list of the directory content
// to start the batch sync.
SetUpDriveServiceExpectCallsForGetResourceList(
- "sync_file_system/listing_files_in_directory.json",
+ "chromeos/sync_file_system/listing_files_in_directory.json",
std::string(),
kDirectoryResourceId);
@@ -743,7 +743,7 @@ TEST_F(DriveFileSyncServiceMockTest, UnregisterOrigin) {
SetUpDriveServiceExpectCallsForGetAboutResource();
SetUpDriveServiceExpectCallsForGetResourceList(
- "sync_file_system/listing_files_in_directory.json",
+ "chromeos/sync_file_system/listing_files_in_directory.json",
std::string(),
kDirectoryResourceId1);
@@ -893,7 +893,7 @@ TEST_F(DriveFileSyncServiceMockTest, RemoteChange_Busy) {
SetUpDriveSyncService(true);
scoped_ptr<ResourceEntry> entry(ResourceEntry::ExtractAndParse(
- *LoadJSONFile("gdata/file_entry.json")));
+ *LoadJSONFile("chromeos/gdata/file_entry.json")));
AppendIncrementalRemoteChangeByEntry(kOrigin, *entry, 12345);
ProcessRemoteChange(SYNC_STATUS_FILE_BUSY,
@@ -937,7 +937,7 @@ TEST_F(DriveFileSyncServiceMockTest, RemoteChange_NewFile) {
SetUpDriveSyncService(true);
scoped_ptr<ResourceEntry> entry(ResourceEntry::ExtractAndParse(
- *LoadJSONFile("gdata/file_entry.json")));
+ *LoadJSONFile("chromeos/gdata/file_entry.json")));
AppendIncrementalRemoteChangeByEntry(kOrigin, *entry, 12345);
ProcessRemoteChange(SYNC_STATUS_OK,
@@ -981,7 +981,7 @@ TEST_F(DriveFileSyncServiceMockTest, RemoteChange_UpdateFile) {
SetUpDriveSyncService(true);
scoped_ptr<ResourceEntry> entry(ResourceEntry::ExtractAndParse(
- *LoadJSONFile("gdata/file_entry.json")));
+ *LoadJSONFile("chromeos/gdata/file_entry.json")));
AppendIncrementalRemoteChangeByEntry(kOrigin, *entry, 12345);
ProcessRemoteChange(SYNC_STATUS_OK,
CreateURL(kOrigin, kFileName),
@@ -1006,7 +1006,7 @@ TEST_F(DriveFileSyncServiceMockTest, RegisterOriginWithSyncDisabled) {
InSequence sequence;
SetUpDriveServiceExpectCallsForGetResourceList(
- "sync_file_system/origin_directory_found.json",
+ "chromeos/sync_file_system/origin_directory_found.json",
FormatTitleQuery(DriveFileSyncClient::OriginToDirectoryTitle(kOrigin)),
kSyncRootResourceId);
@@ -1110,7 +1110,7 @@ TEST_F(DriveFileSyncServiceMockTest, RemoteChange_Folder) {
SetUpDriveSyncService(true);
scoped_ptr<ResourceEntry> entry(ResourceEntry::ExtractAndParse(
- *LoadJSONFile("gdata/file_entry.json")));
+ *LoadJSONFile("chromeos/gdata/file_entry.json")));
entry->set_kind(google_apis::ENTRY_KIND_FOLDER);
// Expect to drop this change for file.