summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos
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 /chrome/browser/chromeos
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
Diffstat (limited to 'chrome/browser/chromeos')
-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
12 files changed, 162 insertions, 145 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