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

Side by Side Diff: chrome/browser/sync/test/integration/sessions_helper.h

Issue 2522663005: [Sync] Updated CookieJarMismatch to handle multiple sync cycles during OpenTabAndGetLocalWindows. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_ 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 15 matching lines...) Expand all
26 using SessionWindowMap = std::map<SessionID::id_type, sessions::SessionWindow*>; 26 using SessionWindowMap = std::map<SessionID::id_type, sessions::SessionWindow*>;
27 using ScopedWindowMap = 27 using ScopedWindowMap =
28 std::map<SessionID::id_type, std::unique_ptr<sessions::SessionWindow>>; 28 std::map<SessionID::id_type, std::unique_ptr<sessions::SessionWindow>>;
29 29
30 // Copies the local session windows of profile |index| to |local_windows|. 30 // Copies the local session windows of profile |index| to |local_windows|.
31 // Returns true if successful. 31 // Returns true if successful.
32 bool GetLocalWindows(int index, ScopedWindowMap* local_windows); 32 bool GetLocalWindows(int index, ScopedWindowMap* local_windows);
33 33
34 // Creates and verifies the creation of a new window for profile |index| with 34 // Creates and verifies the creation of a new window for profile |index| with
35 // one tab displaying |url|. Copies the SessionWindow associated with the new 35 // one tab displaying |url|. Copies the SessionWindow associated with the new
36 // window to |local_windows|. Returns true if successful. 36 // window to |local_windows|. Returns true if successful. This call results in
37 // multiple sessions changes, and performs synchronous blocking. It is rare, but
38 // possible, that multiple sync cycle commits occur as a result of this call.
39 // Test cases should be written to handle this possibility, otherwise they may
40 // flake.
37 bool OpenTabAndGetLocalWindows(int index, 41 bool OpenTabAndGetLocalWindows(int index,
38 const GURL& url, 42 const GURL& url,
39 ScopedWindowMap* local_windows); 43 ScopedWindowMap* local_windows);
40 44
41 // Checks that window count and foreign session count are 0. 45 // Checks that window count and foreign session count are 0.
42 bool CheckInitialState(int index); 46 bool CheckInitialState(int index);
43 47
44 // Returns number of open windows for a profile. 48 // Returns number of open windows for a profile.
45 int GetNumWindows(int index); 49 int GetNumWindows(int index);
46 50
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // StatusChangeChecker implementation. 127 // StatusChangeChecker implementation.
124 bool IsExitConditionSatisfied() override; 128 bool IsExitConditionSatisfied() override;
125 std::string GetDebugMessage() const override; 129 std::string GetDebugMessage() const override;
126 130
127 private: 131 private:
128 int index_; 132 int index_;
129 const std::vector<sessions_helper::ScopedWindowMap>& windows_; 133 const std::vector<sessions_helper::ScopedWindowMap>& windows_;
130 }; 134 };
131 135
132 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_ 136 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698