OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/memory/scoped_vector.h" | 5 #include "base/memory/scoped_vector.h" |
6 #include "chrome/browser/sessions/session_service.h" | 6 #include "chrome/browser/sessions/session_service.h" |
7 #include "chrome/browser/sync/profile_sync_service_harness.h" | 7 #include "chrome/browser/sync/profile_sync_service_harness.h" |
8 #include "chrome/browser/sync/sessions/session_state.h" | 8 #include "chrome/browser/sync/sessions/session_state.h" |
9 #include "chrome/browser/sync/test/live_sync/live_sync_test.h" | 9 #include "chrome/browser/sync/test/integration/sync_test.h" |
10 #include "chrome/browser/sync/test/live_sync/sessions_helper.h" | 10 #include "chrome/browser/sync/test/integration/sessions_helper.h" |
11 | 11 |
12 using sessions_helper::CheckInitialState; | 12 using sessions_helper::CheckInitialState; |
13 using sessions_helper::GetLocalWindows; | 13 using sessions_helper::GetLocalWindows; |
14 using sessions_helper::GetSessionData; | 14 using sessions_helper::GetSessionData; |
15 using sessions_helper::OpenTabAndGetLocalWindows; | 15 using sessions_helper::OpenTabAndGetLocalWindows; |
16 using sessions_helper::WindowsMatch; | 16 using sessions_helper::WindowsMatch; |
17 | 17 |
18 class TwoClientSessionsSyncTest : public LiveSyncTest { | 18 class TwoClientSessionsSyncTest : public SyncTest { |
19 public: | 19 public: |
20 TwoClientSessionsSyncTest() : LiveSyncTest(TWO_CLIENT) {} | 20 TwoClientSessionsSyncTest() : SyncTest(TWO_CLIENT) {} |
21 virtual ~TwoClientSessionsSyncTest() {} | 21 virtual ~TwoClientSessionsSyncTest() {} |
22 | 22 |
23 private: | 23 private: |
24 DISALLOW_COPY_AND_ASSIGN(TwoClientSessionsSyncTest); | 24 DISALLOW_COPY_AND_ASSIGN(TwoClientSessionsSyncTest); |
25 }; | 25 }; |
26 | 26 |
27 static const char* kValidPassphrase = "passphrase!"; | 27 static const char* kValidPassphrase = "passphrase!"; |
28 static const char* kURL1 = "chrome://sync"; | 28 static const char* kURL1 = "chrome://sync"; |
29 static const char* kURL2 = "chrome://version"; | 29 static const char* kURL2 = "chrome://version"; |
30 | 30 |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 ASSERT_TRUE(GetSessionData(0, &sessions0)); | 344 ASSERT_TRUE(GetSessionData(0, &sessions0)); |
345 ASSERT_TRUE(GetSessionData(1, &sessions1)); | 345 ASSERT_TRUE(GetSessionData(1, &sessions1)); |
346 | 346 |
347 // Verify client 1's foreign session matches client 0's current window and | 347 // Verify client 1's foreign session matches client 0's current window and |
348 // vice versa. | 348 // vice versa. |
349 ASSERT_EQ(1U, sessions0.size()); | 349 ASSERT_EQ(1U, sessions0.size()); |
350 ASSERT_EQ(1U, sessions1.size()); | 350 ASSERT_EQ(1U, sessions1.size()); |
351 ASSERT_TRUE(WindowsMatch(sessions1[0]->windows, client0_windows.get())); | 351 ASSERT_TRUE(WindowsMatch(sessions1[0]->windows, client0_windows.get())); |
352 ASSERT_TRUE(WindowsMatch(sessions0[0]->windows, client1_windows.get())); | 352 ASSERT_TRUE(WindowsMatch(sessions0[0]->windows, client1_windows.get())); |
353 } | 353 } |
OLD | NEW |