| Index: chrome/browser/sync/test/integration/two_client_sessions_sync_test.cc
|
| diff --git a/chrome/browser/sync/test/integration/two_client_sessions_sync_test.cc b/chrome/browser/sync/test/integration/two_client_sessions_sync_test.cc
|
| index 9ad194b0a1531920fc0eb27118cc25397bce78fd..583edc29ddb9c199106d614304a92f67bad8d7c4 100644
|
| --- a/chrome/browser/sync/test/integration/two_client_sessions_sync_test.cc
|
| +++ b/chrome/browser/sync/test/integration/two_client_sessions_sync_test.cc
|
| @@ -6,14 +6,19 @@
|
|
|
| #include "base/guid.h"
|
| #include "base/macros.h"
|
| +#include "base/run_loop.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "build/build_config.h"
|
| +#include "chrome/browser/chrome_notification_types.h"
|
| #include "chrome/browser/sessions/session_service.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"
|
| #include "chrome/browser/sync/test/integration/sync_test.h"
|
| +#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
|
| #include "components/sync/engine/cycle/sync_cycle_snapshot.h"
|
| +#include "content/public/browser/notification_service.h"
|
| +#include "content/public/test/test_utils.h"
|
|
|
| using sessions_helper::CheckInitialState;
|
| using sessions_helper::DeleteForeignSession;
|
| @@ -216,3 +221,32 @@ IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest, MultipleWindowsMultipleTabs) {
|
|
|
| WaitForForeignSessionsToSync(0, 1);
|
| }
|
| +
|
| +IN_PROC_BROWSER_TEST_F(TwoClientSessionsSyncTest,
|
| + E2E_ENABLED(DoNotSyncTabsOnBrowserClose)) {
|
| + ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
|
| +
|
| + ASSERT_TRUE(CheckInitialState(0));
|
| + ASSERT_TRUE(CheckInitialState(1));
|
| +
|
| + std::vector<GURL> urls;
|
| + urls.push_back(GURL(kURL1));
|
| + urls.push_back(GURL(kURL2));
|
| + ASSERT_TRUE(sessions_helper::OpenMultipleTabs(0, urls));
|
| +
|
| + // Retain the window information on client 0.
|
| + ScopedWindowMap client0_windows;
|
| + ASSERT_TRUE(GetLocalWindows(0, &client0_windows));
|
| + std::vector<ScopedWindowMap> expected_windows(1);
|
| + expected_windows[0] = std::move(client0_windows);
|
| +
|
| + // Check the foreign windows on client 1.
|
| + ASSERT_TRUE(ForeignSessionsMatchChecker(1, expected_windows).Wait());
|
| +
|
| + // Close browser window on client 0.
|
| + CloseBrowserWindowAtIndex(0);
|
| + ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
|
| +
|
| + // Foreign windows on client 1 shouldn't be changed.
|
| + ASSERT_TRUE(ForeignSessionsMatchChecker(1, expected_windows).Wait());
|
| +}
|
|
|