| 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" | |
| 11 #include "components/browser_sync/profile_sync_service.h" | 8 #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 } | |
| 22 | 9 |
| 23 ServerCountMatchStatusChecker::ServerCountMatchStatusChecker( | 10 ServerCountMatchStatusChecker::ServerCountMatchStatusChecker( |
| 24 syncer::ModelType type, | 11 syncer::ModelType type, |
| 25 size_t count) | 12 size_t count) |
| 26 : type_(type), count_(count) {} | 13 : type_(type), count_(count) {} |
| 27 | 14 |
| 28 bool ServerCountMatchStatusChecker::IsExitConditionSatisfied() { | 15 bool ServerCountMatchStatusChecker::IsExitConditionSatisfied() { |
| 29 return count_ == fake_server()->GetSyncEntitiesByModelType(type_).size(); | 16 return count_ == fake_server()->GetSyncEntitiesByModelType(type_).size(); |
| 30 } | 17 } |
| 31 | 18 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 54 : SingleClientStatusChangeChecker(service) {} | 41 : SingleClientStatusChangeChecker(service) {} |
| 55 | 42 |
| 56 bool PassphraseAcceptedChecker::IsExitConditionSatisfied() { | 43 bool PassphraseAcceptedChecker::IsExitConditionSatisfied() { |
| 57 return !service()->IsPassphraseRequired() && | 44 return !service()->IsPassphraseRequired() && |
| 58 service()->IsUsingSecondaryPassphrase(); | 45 service()->IsUsingSecondaryPassphrase(); |
| 59 } | 46 } |
| 60 | 47 |
| 61 std::string PassphraseAcceptedChecker::GetDebugMessage() const { | 48 std::string PassphraseAcceptedChecker::GetDebugMessage() const { |
| 62 return "Passhrase Accepted"; | 49 return "Passhrase Accepted"; |
| 63 } | 50 } |
| OLD | NEW |