OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/sync/test/integration/sync_integration_test_util.h" | 5 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/sync/test/integration/themes_helper.h" |
| 10 #include "chrome/browser/themes/theme_service_factory.h" |
8 #include "components/browser_sync/profile_sync_service.h" | 11 #include "components/browser_sync/profile_sync_service.h" |
| 12 #include "content/public/test/test_utils.h" |
| 13 |
| 14 void SetCustomTheme(Profile* profile, int theme_index) { |
| 15 themes_helper::UseCustomTheme(profile, theme_index); |
| 16 content::WindowedNotificationObserver theme_change_observer( |
| 17 chrome::NOTIFICATION_BROWSER_THEME_CHANGED, |
| 18 content::Source<ThemeService>( |
| 19 ThemeServiceFactory::GetForProfile(profile))); |
| 20 theme_change_observer.Wait(); |
| 21 } |
9 | 22 |
10 ServerCountMatchStatusChecker::ServerCountMatchStatusChecker( | 23 ServerCountMatchStatusChecker::ServerCountMatchStatusChecker( |
11 syncer::ModelType type, | 24 syncer::ModelType type, |
12 size_t count) | 25 size_t count) |
13 : type_(type), count_(count) {} | 26 : type_(type), count_(count) {} |
14 | 27 |
15 bool ServerCountMatchStatusChecker::IsExitConditionSatisfied() { | 28 bool ServerCountMatchStatusChecker::IsExitConditionSatisfied() { |
16 return count_ == fake_server()->GetSyncEntitiesByModelType(type_).size(); | 29 return count_ == fake_server()->GetSyncEntitiesByModelType(type_).size(); |
17 } | 30 } |
18 | 31 |
(...skipping 22 matching lines...) Expand all Loading... |
41 : SingleClientStatusChangeChecker(service) {} | 54 : SingleClientStatusChangeChecker(service) {} |
42 | 55 |
43 bool PassphraseAcceptedChecker::IsExitConditionSatisfied() { | 56 bool PassphraseAcceptedChecker::IsExitConditionSatisfied() { |
44 return !service()->IsPassphraseRequired() && | 57 return !service()->IsPassphraseRequired() && |
45 service()->IsUsingSecondaryPassphrase(); | 58 service()->IsUsingSecondaryPassphrase(); |
46 } | 59 } |
47 | 60 |
48 std::string PassphraseAcceptedChecker::GetDebugMessage() const { | 61 std::string PassphraseAcceptedChecker::GetDebugMessage() const { |
49 return "Passhrase Accepted"; | 62 return "Passhrase Accepted"; |
50 } | 63 } |
OLD | NEW |