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

Side by Side Diff: chrome/browser/sync/test/integration/two_client_dictionary_sync_test.cc

Issue 148723002: [sync] Eliminate Await*SyncCompletion methods in integration tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/strings/string_number_conversions.h" 5 #include "base/strings/string_number_conversions.h"
6 #include "chrome/browser/sync/test/integration/dictionary_helper.h" 6 #include "chrome/browser/sync/test/integration/dictionary_helper.h"
7 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" 7 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
8 #include "chrome/browser/sync/test/integration/sync_test.h" 8 #include "chrome/browser/sync/test/integration/sync_test.h"
9 #include "chrome/common/spellcheck_common.h" 9 #include "chrome/common/spellcheck_common.h"
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 ASSERT_EQ(1UL, dictionary_helper::GetDictionarySize(0)); 99 ASSERT_EQ(1UL, dictionary_helper::GetDictionarySize(0));
100 } 100 }
101 101
102 IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest, DisableSync) { 102 IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest, DisableSync) {
103 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 103 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
104 dictionary_helper::LoadDictionaries(); 104 dictionary_helper::LoadDictionaries();
105 ASSERT_TRUE(dictionary_helper::DictionariesMatch()); 105 ASSERT_TRUE(dictionary_helper::DictionariesMatch());
106 106
107 ASSERT_TRUE(GetClient(1)->DisableSyncForAllDatatypes()); 107 ASSERT_TRUE(GetClient(1)->DisableSyncForAllDatatypes());
108 ASSERT_TRUE(dictionary_helper::AddWord(0, "foo")); 108 ASSERT_TRUE(dictionary_helper::AddWord(0, "foo"));
109 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion()); 109 ASSERT_TRUE(GetClient(0)->AwaitCommitActivityCompletion());
110 ASSERT_TRUE(dictionary_helper::DictionaryMatchesVerifier(0)); 110 ASSERT_TRUE(dictionary_helper::DictionaryMatchesVerifier(0));
111 ASSERT_FALSE(dictionary_helper::DictionaryMatchesVerifier(1)); 111 ASSERT_FALSE(dictionary_helper::DictionaryMatchesVerifier(1));
112 } 112 }
113 113
114 IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest, Limit) { 114 IN_PROC_BROWSER_TEST_F(TwoClientDictionarySyncTest, Limit) {
115 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 115 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
116 dictionary_helper::LoadDictionaries(); 116 dictionary_helper::LoadDictionaries();
117 ASSERT_TRUE(dictionary_helper::DictionariesMatch()); 117 ASSERT_TRUE(dictionary_helper::DictionariesMatch());
118 118
119 ASSERT_TRUE(GetClient(0)->DisableSyncForAllDatatypes()); 119 ASSERT_TRUE(GetClient(0)->DisableSyncForAllDatatypes());
(...skipping 20 matching lines...) Expand all
140 ASSERT_TRUE(AwaitQuiescence()); 140 ASSERT_TRUE(AwaitQuiescence());
141 141
142 // Client #0 should have both "foo" and "bar" sets of words. 142 // Client #0 should have both "foo" and "bar" sets of words.
143 ASSERT_EQ(chrome::spellcheck_common::MAX_SYNCABLE_DICTIONARY_WORDS * 2, 143 ASSERT_EQ(chrome::spellcheck_common::MAX_SYNCABLE_DICTIONARY_WORDS * 2,
144 dictionary_helper::GetDictionarySize(0)); 144 dictionary_helper::GetDictionarySize(0));
145 145
146 // The sync server and client #1 should have only "bar" set of words. 146 // The sync server and client #1 should have only "bar" set of words.
147 ASSERT_EQ(chrome::spellcheck_common::MAX_SYNCABLE_DICTIONARY_WORDS, 147 ASSERT_EQ(chrome::spellcheck_common::MAX_SYNCABLE_DICTIONARY_WORDS,
148 dictionary_helper::GetDictionarySize(1)); 148 dictionary_helper::GetDictionarySize(1));
149 } 149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698