| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/guid.h" | 7 #include "base/guid.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "chrome/browser/sessions/session_service.h" | 11 #include "chrome/browser/sessions/session_service.h" |
| 12 #include "chrome/browser/sync/test/integration/passwords_helper.h" | 12 #include "chrome/browser/sync/test/integration/passwords_helper.h" |
| 13 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 13 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
| 14 #include "chrome/browser/sync/test/integration/sessions_helper.h" | 14 #include "chrome/browser/sync/test/integration/sessions_helper.h" |
| 15 #include "chrome/browser/sync/test/integration/sync_test.h" | 15 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 16 #include "components/sync/engine/cycle/sync_cycle_snapshot.h" | 16 #include "components/sync/engine/cycle/sync_cycle_snapshot.h" |
| 17 | 17 |
| 18 using passwords_helper::SetDecryptionPassphrase; | |
| 19 using passwords_helper::SetEncryptionPassphrase; | |
| 20 using sessions_helper::AwaitCheckForeignSessionsAgainst; | 18 using sessions_helper::AwaitCheckForeignSessionsAgainst; |
| 21 using sessions_helper::CheckInitialState; | 19 using sessions_helper::CheckInitialState; |
| 22 using sessions_helper::DeleteForeignSession; | 20 using sessions_helper::DeleteForeignSession; |
| 23 using sessions_helper::GetLocalWindows; | 21 using sessions_helper::GetLocalWindows; |
| 24 using sessions_helper::GetSessionData; | 22 using sessions_helper::GetSessionData; |
| 25 using sessions_helper::OpenTabAndGetLocalWindows; | 23 using sessions_helper::OpenTabAndGetLocalWindows; |
| 26 using sessions_helper::ScopedWindowMap; | 24 using sessions_helper::ScopedWindowMap; |
| 27 using sessions_helper::SessionWindowMap; | 25 using sessions_helper::SessionWindowMap; |
| 28 using sessions_helper::SyncedSessionVector; | 26 using sessions_helper::SyncedSessionVector; |
| 29 using sessions_helper::WindowsMatch; | 27 using sessions_helper::WindowsMatch; |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 ASSERT_TRUE(GetClient(1)->AwaitMutualSyncCycleCompletion(GetClient(0))); | 225 ASSERT_TRUE(GetClient(1)->AwaitMutualSyncCycleCompletion(GetClient(0))); |
| 228 ASSERT_FALSE(GetSessionData(1, &sessions1)); | 226 ASSERT_FALSE(GetSessionData(1, &sessions1)); |
| 229 | 227 |
| 230 // Client 0 becomes active again with a new tab. | 228 // Client 0 becomes active again with a new tab. |
| 231 ASSERT_TRUE(OpenTabAndGetLocalWindows(0, GURL(kURL2), &client0_windows)); | 229 ASSERT_TRUE(OpenTabAndGetLocalWindows(0, GURL(kURL2), &client0_windows)); |
| 232 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 230 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 233 ASSERT_TRUE(GetSessionData(1, &sessions1)); | 231 ASSERT_TRUE(GetSessionData(1, &sessions1)); |
| 234 ASSERT_EQ(1U, sessions1.size()); | 232 ASSERT_EQ(1U, sessions1.size()); |
| 235 ASSERT_TRUE(WindowsMatch(sessions1[0]->windows, client0_windows)); | 233 ASSERT_TRUE(WindowsMatch(sessions1[0]->windows, client0_windows)); |
| 236 } | 234 } |
| OLD | NEW |