Commit 280faf60 authored by James Cook's avatar James Cook Committed by Commit Bot

cros: Fix sync passphrase notification tests with SplitSettingsSync

A couple of tests verify that no notifications are shown if the sync
system is disabled. They need to be updated to turn off OS sync on
Chrome OS, because we still show the notifications if OS sync is
enabled.

These manifest as unit_tests failures when I run:
unit_tests --enable-features=SplitSettingsSync

This CL is preparation for turning SplitSettingsSync on by default.

Bug: 1060289
Change-Id: Ia3e8d9d3b5be0879b1c929faed0f988338b730bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2103439
Commit-Queue: Marc Treib <treib@chromium.org>
Auto-Submit: James Cook <jamescook@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750506}
parent 673bea57
......@@ -103,6 +103,7 @@ TEST_F(SyncErrorNotifierTest, NoNotificationWhenNoPassphrase) {
TEST_F(SyncErrorNotifierTest, NoNotificationWhenSyncDisabled) {
service_.SetPassphraseRequiredForPreferredDataTypes(true);
service_.SetFirstSetupComplete(false);
service_.GetUserSettings()->SetOsSyncFeatureEnabled(false);
error_notifier_->OnStateChanged(&service_);
ExpectNotificationShown(false);
}
......
......@@ -347,6 +347,9 @@ TEST(SyncUIUtilTest, ShouldShowPassphraseError) {
TEST(SyncUIUtilTest, ShouldShowPassphraseError_SyncDisabled) {
syncer::TestSyncService service;
service.SetFirstSetupComplete(false);
#if defined(OS_CHROMEOS)
service.GetUserSettings()->SetOsSyncFeatureEnabled(false);
#endif // defined(OS_CHROMEOS)
service.SetPassphraseRequiredForPreferredDataTypes(true);
EXPECT_FALSE(ShouldShowPassphraseError(&service));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment