Commit e22c454c authored by Mikel Astiz's avatar Mikel Astiz Committed by Commit Bot

Revert "Rewrite sync tests to use custom passphrase logic"

This reverts commit 38ebe59c.

Reason for revert: likely culprit for flakiness in
SingleClientUserEventsSyncTest.Encryption.

Bug: 1020070

Original change's description:
> Rewrite sync tests to use custom passphrase logic
> 
> SingleClientUserEventsSyncTest.Encryption and
> TwoClientSessionsSyncTest.NoHistoryIfEncryptionEnabled used
> EnableEncryption(), which only works with Directory implementation of
> Nigori and outdated. They were rewritten to enable custom passphrase
> instead.
> 
> Bug: 922900
> Change-Id: Ia5fedeae5b7c7071c1ecc82063e5742934caf2e0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1890316
> Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com>
> Commit-Queue: Mikel Astiz <mastiz@chromium.org>
> Auto-Submit: Maksim Moskvitin <mmoskvitin@google.com>
> Reviewed-by: Mikel Astiz <mastiz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#710839}

TBR=mastiz@chromium.org,mmoskvitin@google.com

Change-Id: Ie1e8e934c34678b5c96d7a42e293faaefc117c70
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 922900
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1891172Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711172}
parent 85bd68c7
......@@ -192,7 +192,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientUserEventsSyncTest, Encryption) {
browser_sync::UserEventServiceFactory::GetForProfile(GetProfile(0));
event_service->RecordUserEvent(test_event1);
EXPECT_TRUE(ExpectUserEvents({test_event1}));
GetSyncService(0)->GetUserSettings()->SetEncryptionPassphrase("passphrase");
ASSERT_TRUE(EnableEncryption(0));
event_service->RecordUserEvent(test_event2);
// Just checking that we don't see test_event2 isn't very convincing yet,
......
......@@ -9,7 +9,6 @@
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sync/test/integration/encryption_helper.h"
#include "chrome/browser/sync/test/integration/passwords_helper.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/sessions_helper.h"
......@@ -247,12 +246,11 @@ IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest,
ASSERT_TRUE(CheckInitialState(0));
ASSERT_TRUE(CheckInitialState(1));
GetSyncService(0)->GetUserSettings()->SetEncryptionPassphrase("passphrase");
ASSERT_TRUE(
PassphraseRequiredStateChecker(GetSyncService(1), /*desired_state=*/true)
.Wait());
ASSERT_TRUE(GetSyncService(1)->GetUserSettings()->SetDecryptionPassphrase(
"passphrase"));
ASSERT_TRUE(EnableEncryption(0));
ASSERT_TRUE(EnableEncryption(1));
ASSERT_TRUE(AwaitQuiescence());
ASSERT_TRUE(IsEncryptionComplete(0));
ASSERT_TRUE(IsEncryptionComplete(1));
EXPECT_TRUE(OpenTab(0, GURL(kURL1)));
WaitForForeignSessionsToSync(0, 1);
......
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