OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |