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

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

Issue 12096116: Enable dictionary sync by default (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge master Created 7 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 (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/string_number_conversions.h" 5 #include "base/string_number_conversions.h"
6 #include "chrome/browser/sync/profile_sync_service_harness.h" 6 #include "chrome/browser/sync/profile_sync_service_harness.h"
7 #include "chrome/browser/sync/test/integration/dictionary_helper.h" 7 #include "chrome/browser/sync/test/integration/dictionary_helper.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
11 class MultipleClientDictionarySyncTest : public SyncTest { 11 class MultipleClientDictionarySyncTest : public SyncTest {
12 public: 12 public:
13 MultipleClientDictionarySyncTest() : SyncTest(MULTIPLE_CLIENT) {} 13 MultipleClientDictionarySyncTest() : SyncTest(MULTIPLE_CLIENT) {}
14 virtual ~MultipleClientDictionarySyncTest() {} 14 virtual ~MultipleClientDictionarySyncTest() {}
15 15
16 virtual void AddOptionalTypesToCommandLine(CommandLine* cl) OVERRIDE {
17 dictionary_helper::EnableDictionarySync(cl);
18 }
19
20 private: 16 private:
21 DISALLOW_COPY_AND_ASSIGN(MultipleClientDictionarySyncTest); 17 DISALLOW_COPY_AND_ASSIGN(MultipleClientDictionarySyncTest);
22 }; 18 };
23 19
24 IN_PROC_BROWSER_TEST_F(MultipleClientDictionarySyncTest, AddToOne) { 20 IN_PROC_BROWSER_TEST_F(MultipleClientDictionarySyncTest, AddToOne) {
25 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 21 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
26 dictionary_helper::LoadDictionaries(); 22 dictionary_helper::LoadDictionaries();
27 ASSERT_TRUE(dictionary_helper::DictionariesMatch()); 23 ASSERT_TRUE(dictionary_helper::DictionariesMatch());
28 24
29 ASSERT_TRUE(dictionary_helper::AddWord(0, "foo")); 25 ASSERT_TRUE(dictionary_helper::AddWord(0, "foo"));
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 dictionary_helper::GetDictionarySize(i)); 97 dictionary_helper::GetDictionarySize(i));
102 } 98 }
103 99
104 // Client #0 should still have only 1300 words after syncing all other 100 // Client #0 should still have only 1300 words after syncing all other
105 // clients, because it has the same data as the sync server. 101 // clients, because it has the same data as the sync server.
106 ASSERT_EQ(chrome::spellcheck_common::MAX_SYNCABLE_DICTIONARY_WORDS, 102 ASSERT_EQ(chrome::spellcheck_common::MAX_SYNCABLE_DICTIONARY_WORDS,
107 dictionary_helper::GetDictionarySize(0)); 103 dictionary_helper::GetDictionarySize(0));
108 104
109 MessageLoop::current()->RunUntilIdle(); 105 MessageLoop::current()->RunUntilIdle();
110 } 106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698