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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc

Issue 10408071: gdata: Fix a crash when adding a new file to a new but deleted directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
index ab051c20d8131eaa72ba0514d343bc224d6d13a2..32ff5a851349721b1760ef1b7490e8f8a11d9480 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
@@ -1434,6 +1434,18 @@ TEST_F(GDataFileSystemTest, ChangeFeed_AddFileToNewDirectory) {
FILE_PATH_LITERAL("drive/New Directory/File in new dir.gdoc"))));
}
+TEST_F(GDataFileSystemTest, ChangeFeed_AddFileToNewButDeletedDirectory) {
+ int latest_changelog = 0;
+ LoadRootFeedDocument("root_feed.json");
+
+ // This feed contains thw 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.
+ LoadChangeFeed("delta_file_added_in_new_but_deleted_directory.json",
+ ++latest_changelog);
+}
+
TEST_F(GDataFileSystemTest, ChangeFeed_DirectoryMovedFromRootToDirectory) {
int latest_changelog = 0;
LoadRootFeedDocument("root_feed.json");

Powered by Google App Engine
This is Rietveld 408576698