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

Unified Diff: chrome/browser/chromeos/drive/file_system/copy_operation_unittest.cc

Issue 23344004: Use CopyResourceOnServer to upload JSON GDoc file on Drive API v2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/copy_operation.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/file_system/copy_operation_unittest.cc
diff --git a/chrome/browser/chromeos/drive/file_system/copy_operation_unittest.cc b/chrome/browser/chromeos/drive/file_system/copy_operation_unittest.cc
index 837d8b010c8607da49a100be6c7d7faf453ed169..12a6b145416e84dbba19c65b1a56ad15486223e2 100644
--- a/chrome/browser/chromeos/drive/file_system/copy_operation_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system/copy_operation_unittest.cc
@@ -7,6 +7,7 @@
#include "base/file_util.h"
#include "chrome/browser/chromeos/drive/file_system/operation_test_base.h"
#include "chrome/browser/chromeos/drive/file_system_util.h"
+#include "chrome/browser/drive/drive_api_util.h"
#include "chrome/browser/drive/fake_drive_service.h"
#include "chrome/browser/google_apis/test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -137,11 +138,17 @@ TEST_F(CopyOperationTest, TransferFileFromLocalToRemote_HostedDocument) {
EXPECT_EQ(FILE_ERROR_OK, GetLocalResourceEntry(remote_dest_path, &entry));
// We added a file to the Drive root and then moved to "Directory 1".
- EXPECT_EQ(2U, observer()->get_changed_paths().size());
- EXPECT_TRUE(observer()->get_changed_paths().count(
- base::FilePath(FILE_PATH_LITERAL("drive/root"))));
- EXPECT_TRUE(observer()->get_changed_paths().count(
- remote_dest_path.DirName()));
+ if (util::IsDriveV2ApiEnabled()) {
+ EXPECT_EQ(1U, observer()->get_changed_paths().size());
+ EXPECT_TRUE(
+ observer()->get_changed_paths().count(remote_dest_path.DirName()));
+ } else {
+ EXPECT_EQ(2U, observer()->get_changed_paths().size());
+ EXPECT_TRUE(observer()->get_changed_paths().count(
+ base::FilePath(FILE_PATH_LITERAL("drive/root"))));
+ EXPECT_TRUE(observer()->get_changed_paths().count(
+ remote_dest_path.DirName()));
+ }
}
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/copy_operation.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698