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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc

Issue 881403003: Rename gdata_errorcode.h to drive_api_error_codes.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typos in BUILD.gn Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 #include <stack> 6 #include <stack>
7 7
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 395
396 // Verifies local and remote files/folders are consistent. 396 // Verifies local and remote files/folders are consistent.
397 // This function checks: 397 // This function checks:
398 // - Each registered origin has corresponding remote folder. 398 // - Each registered origin has corresponding remote folder.
399 // - Each local file/folder has corresponding remote one. 399 // - Each local file/folder has corresponding remote one.
400 // - Each remote file/folder has corresponding local one. 400 // - Each remote file/folder has corresponding local one.
401 // TODO(tzik): Handle conflict case. i.e. allow remote file has different 401 // TODO(tzik): Handle conflict case. i.e. allow remote file has different
402 // file content if the corresponding local file conflicts to it. 402 // file content if the corresponding local file conflicts to it.
403 void VerifyConsistency() { 403 void VerifyConsistency() {
404 std::string sync_root_folder_id; 404 std::string sync_root_folder_id;
405 google_apis::GDataErrorCode error = 405 google_apis::DriveApiErrorCode error =
406 fake_drive_service_helper_->GetSyncRootFolderID(&sync_root_folder_id); 406 fake_drive_service_helper_->GetSyncRootFolderID(&sync_root_folder_id);
407 if (sync_root_folder_id.empty()) { 407 if (sync_root_folder_id.empty()) {
408 EXPECT_EQ(google_apis::HTTP_NOT_FOUND, error); 408 EXPECT_EQ(google_apis::HTTP_NOT_FOUND, error);
409 EXPECT_TRUE(file_systems_.empty()); 409 EXPECT_TRUE(file_systems_.empty());
410 return; 410 return;
411 } 411 }
412 EXPECT_EQ(google_apis::HTTP_SUCCESS, error); 412 EXPECT_EQ(google_apis::HTTP_SUCCESS, error);
413 413
414 ScopedVector<google_apis::FileResource> remote_entries; 414 ScopedVector<google_apis::FileResource> remote_entries;
415 EXPECT_EQ(google_apis::HTTP_SUCCESS, 415 EXPECT_EQ(google_apis::HTTP_SUCCESS,
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 1720
1721 EXPECT_EQ(1u, CountApp()); 1721 EXPECT_EQ(1u, CountApp());
1722 EXPECT_EQ(1u, CountLocalFile(app_id)); 1722 EXPECT_EQ(1u, CountLocalFile(app_id));
1723 1723
1724 EXPECT_EQ(2u, CountMetadata()); 1724 EXPECT_EQ(2u, CountMetadata());
1725 EXPECT_EQ(2u, CountTracker()); 1725 EXPECT_EQ(2u, CountTracker());
1726 } 1726 }
1727 1727
1728 } // namespace drive_backend 1728 } // namespace drive_backend
1729 } // namespace sync_file_system 1729 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698