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

Side by Side Diff: chrome/browser/sync/profile_sync_service_typed_url_unittest.cc

Issue 10662035: [Sync] Put everything in sync/api into csync namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 5 #include <vector>
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 922
923 history::URLRows native_entries; 923 history::URLRows native_entries;
924 native_entries.push_back(native_entry); 924 native_entries.push_back(native_entry);
925 EXPECT_CALL((*history_backend_.get()), GetAllTypedURLs(_)). 925 EXPECT_CALL((*history_backend_.get()), GetAllTypedURLs(_)).
926 WillOnce(DoAll(SetArgumentPointee<0>(native_entries), Return(false))); 926 WillOnce(DoAll(SetArgumentPointee<0>(native_entries), Return(false)));
927 927
928 history::URLRows sync_entries; 928 history::URLRows sync_entries;
929 sync_entries.push_back(sync_entry); 929 sync_entries.push_back(sync_entry);
930 930
931 EXPECT_CALL(error_handler_, CreateAndUploadError(_, _, _)). 931 EXPECT_CALL(error_handler_, CreateAndUploadError(_, _, _)).
932 WillOnce(Return(SyncError(FROM_HERE, 932 WillOnce(Return(csync::SyncError(FROM_HERE,
933 "Unit test", 933 "Unit test",
934 syncable::TYPED_URLS))); 934 syncable::TYPED_URLS)));
935 StartSyncService(base::Bind(&AddTypedUrlEntries, this, sync_entries)); 935 StartSyncService(base::Bind(&AddTypedUrlEntries, this, sync_entries));
936 // Errors getting typed URLs will cause an unrecoverable error (since we can 936 // Errors getting typed URLs will cause an unrecoverable error (since we can
937 // do *nothing* in that case). 937 // do *nothing* in that case).
938 ASSERT_TRUE( 938 ASSERT_TRUE(
939 service_->failed_datatypes_handler().GetFailedTypes().Has( 939 service_->failed_datatypes_handler().GetFailedTypes().Has(
940 syncable::TYPED_URLS)); 940 syncable::TYPED_URLS));
941 ASSERT_EQ( 941 ASSERT_EQ(
942 1u, service_->failed_datatypes_handler().GetFailedTypes().Size()); 942 1u, service_->failed_datatypes_handler().GetFailedTypes().Size());
943 // Can't check GetErrorPercentage(), because generating an unrecoverable 943 // Can't check GetErrorPercentage(), because generating an unrecoverable
944 // error will free the model associator. 944 // error will free the model associator.
945 } 945 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_startup_unittest.cc ('k') | chrome/browser/sync/test/integration/sync_errors_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698