| OLD | NEW |
| 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/performance/sync_timing_helper.h" | 8 #include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h" |
| 9 #include "chrome/browser/sync/test/integration/sync_test.h" | 9 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 10 #include "chrome/common/spellcheck_common.h" | 10 #include "chrome/common/spellcheck_common.h" |
| 11 | 11 |
| 12 class DictionarySyncPerfTest : public SyncTest { | 12 class DictionarySyncPerfTest : public SyncTest { |
| 13 public: | 13 public: |
| 14 DictionarySyncPerfTest() : SyncTest(TWO_CLIENT) {} | 14 DictionarySyncPerfTest() : SyncTest(TWO_CLIENT) {} |
| 15 virtual ~DictionarySyncPerfTest() {} | 15 virtual ~DictionarySyncPerfTest() {} |
| 16 | 16 |
| 17 virtual void AddOptionalTypesToCommandLine(CommandLine* cl) OVERRIDE { | |
| 18 dictionary_helper::EnableDictionarySync(cl); | |
| 19 } | |
| 20 | |
| 21 private: | 17 private: |
| 22 DISALLOW_COPY_AND_ASSIGN(DictionarySyncPerfTest); | 18 DISALLOW_COPY_AND_ASSIGN(DictionarySyncPerfTest); |
| 23 }; | 19 }; |
| 24 | 20 |
| 25 IN_PROC_BROWSER_TEST_F(DictionarySyncPerfTest, P0) { | 21 IN_PROC_BROWSER_TEST_F(DictionarySyncPerfTest, P0) { |
| 26 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 22 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 27 dictionary_helper::LoadDictionaries(); | 23 dictionary_helper::LoadDictionaries(); |
| 28 ASSERT_TRUE(dictionary_helper::DictionariesMatch()); | 24 ASSERT_TRUE(dictionary_helper::DictionariesMatch()); |
| 29 | 25 |
| 30 base::TimeDelta dt; | 26 base::TimeDelta dt; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 44 ++i) { | 40 ++i) { |
| 45 ASSERT_TRUE(dictionary_helper::RemoveWord( | 41 ASSERT_TRUE(dictionary_helper::RemoveWord( |
| 46 0, "foo" + base::Uint64ToString(i))); | 42 0, "foo" + base::Uint64ToString(i))); |
| 47 } | 43 } |
| 48 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); | 44 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); |
| 49 ASSERT_EQ(0UL, dictionary_helper::GetDictionarySize(1)); | 45 ASSERT_EQ(0UL, dictionary_helper::GetDictionarySize(1)); |
| 50 SyncTimingHelper::PrintResult("dictionary", "remove_words", dt); | 46 SyncTimingHelper::PrintResult("dictionary", "remove_words", dt); |
| 51 | 47 |
| 52 MessageLoop::current()->RunUntilIdle(); | 48 MessageLoop::current()->RunUntilIdle(); |
| 53 } | 49 } |
| OLD | NEW |