Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / sync / glue / session_sync_test_helper.h
blobea576e5d5c1dffe10f8e7ad979fa5fcd3d2ab5f2
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_GLUE_SESSION_SYNC_TEST_HELPER_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_SYNC_TEST_HELPER_H_
8 #include <string>
9 #include <vector>
11 #include "chrome/browser/sessions/session_id.h"
13 namespace sync_pb {
14 class SessionSpecifics;
17 namespace browser_sync {
19 struct SyncedSession;
21 class SessionSyncTestHelper {
22 public:
23 SessionSyncTestHelper() : max_tab_node_id_(0) {}
25 static void BuildSessionSpecifics(const std::string& tag,
26 sync_pb::SessionSpecifics* meta);
28 static void AddWindowSpecifics(int window_id,
29 const std::vector<int>& tab_list,
30 sync_pb::SessionSpecifics* meta);
32 static void VerifySyncedSession(
33 const std::string& tag,
34 const std::vector<std::vector<SessionID::id_type> >& windows,
35 const SyncedSession& session);
37 void BuildTabSpecifics(const std::string& tag,
38 int window_id,
39 int tab_id,
40 sync_pb::SessionSpecifics* tab_base);
42 sync_pb::SessionSpecifics BuildForeignSession(
43 const std::string& tag,
44 const std::vector<SessionID::id_type>& tab_list,
45 std::vector<sync_pb::SessionSpecifics>* tabs);
47 void Reset();
49 private:
50 int max_tab_node_id_;
51 DISALLOW_COPY_AND_ASSIGN(SessionSyncTestHelper);
54 } // namespace browser_sync
56 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_SYNC_TEST_HELPER_H_