Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc

Issue 7861013: Fix the false-positive detection of commit errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another attempt at detecting errors Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/test/integration/sync_test.h" 8 #include "chrome/browser/sync/test/integration/sync_test.h"
9 #include "chrome/browser/sync/test/integration/sessions_helper.h" 9 #include "chrome/browser/sync/test/integration/sessions_helper.h"
10 10
(...skipping 17 matching lines...) Expand all
28 IN_PROC_BROWSER_TEST_F(SingleClientSessionsSyncTest, Sanity) { 28 IN_PROC_BROWSER_TEST_F(SingleClientSessionsSyncTest, Sanity) {
29 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 29 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
30 30
31 ASSERT_TRUE(CheckInitialState(0)); 31 ASSERT_TRUE(CheckInitialState(0));
32 32
33 ScopedWindowMap old_windows; 33 ScopedWindowMap old_windows;
34 ASSERT_TRUE(OpenTabAndGetLocalWindows(0, 34 ASSERT_TRUE(OpenTabAndGetLocalWindows(0,
35 GURL("about:bubba"), 35 GURL("about:bubba"),
36 old_windows.GetMutable())); 36 old_windows.GetMutable()));
37 37
38 ASSERT_TRUE(GetClient(0)->AwaitSyncCycleCompletion( 38 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion(
39 "Waiting for session change.")); 39 "Waiting for session change."));
40 40
41 // Get foreign session data from client 0. 41 // Get foreign session data from client 0.
42 SyncedSessionVector sessions; 42 SyncedSessionVector sessions;
43 ASSERT_FALSE(GetSessionData(0, &sessions)); 43 ASSERT_FALSE(GetSessionData(0, &sessions));
44 ASSERT_EQ(0U, sessions.size()); 44 ASSERT_EQ(0U, sessions.size());
45 45
46 // Verify client didn't change. 46 // Verify client didn't change.
47 ScopedWindowMap new_windows; 47 ScopedWindowMap new_windows;
48 ASSERT_TRUE(GetLocalWindows(0, new_windows.GetMutable())); 48 ASSERT_TRUE(GetLocalWindows(0, new_windows.GetMutable()));
49 ASSERT_TRUE(WindowsMatch(*old_windows.Get(), *new_windows.Get())); 49 ASSERT_TRUE(WindowsMatch(*old_windows.Get(), *new_windows.Get()));
50 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698