#include <string>
#include "base/strings/stringprintf.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_timeouts.h"
#include "base/threading/thread_restrictions.h"
#include "base/uuid.h"
#include "build/build_config.h"
#include "chrome/browser/browser_features.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/sessions_helper.h"
#include "chrome/browser/sync/test/integration/sync_service_impl_harness.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "components/sync/engine/cycle/sync_cycle_snapshot.h"
#include "components/sync/test/fake_server_verifier.h"
#include "components/sync/test/sessions_hierarchy.h"
#include "content/public/test/browser_test.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
CheckInitialState;
CloseTab;
DeleteForeignSession;
ForeignSessionsMatchChecker;
GetLocalWindows;
GetSessionData;
NavigateTab;
OpenMultipleTabs;
OpenTab;
OpenTabAtIndex;
ScopedWindowMap;
SessionWindowMap;
SyncedSessionVector;
WindowsMatch;
IsEmpty;
class TwoClientSessionsSyncTest : public SyncTest { … };
constexpr char kURL1[] = …;
constexpr char kURL2[] = …;
constexpr char kURL3[] = …;
constexpr char kURL4[] = …;
constexpr char kURLTemplate[] = …;
IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest,
E2E_ENABLED(SingleClientChanged)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest, SingleClientClosed) { … }
IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest, E2E_ENABLED(AllChanged)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest, BothChanged) { … }
IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest, DeleteIdleSession) { … }
IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest, DeleteActiveSession) { … }
IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest, MultipleWindowsMultipleTabs) { … }
IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest,
NoHistoryIfEncryptionEnabled) { … }
class TwoClientSessionsWithoutDestroyProfileSyncTest
: public TwoClientSessionsSyncTest { … };
IN_PROC_BROWSER_TEST_F(TwoClientSessionsWithoutDestroyProfileSyncTest,
ShouldSyncAllClosedTabs) { … }
}