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_
11 #include "components/sessions/session_id.h"
13 namespace sync_driver
{
18 class SessionSpecifics
;
21 namespace browser_sync
{
23 class SessionSyncTestHelper
{
25 SessionSyncTestHelper() : max_tab_node_id_(0) {}
27 static void BuildSessionSpecifics(const std::string
& tag
,
28 sync_pb::SessionSpecifics
* meta
);
30 static void AddWindowSpecifics(int window_id
,
31 const std::vector
<int>& tab_list
,
32 sync_pb::SessionSpecifics
* meta
);
34 static void VerifySyncedSession(
35 const std::string
& tag
,
36 const std::vector
<std::vector
<SessionID::id_type
>>& windows
,
37 const sync_driver::SyncedSession
& session
);
39 void BuildTabSpecifics(const std::string
& tag
,
42 sync_pb::SessionSpecifics
* tab_base
);
44 sync_pb::SessionSpecifics
BuildForeignSession(
45 const std::string
& tag
,
46 const std::vector
<SessionID::id_type
>& tab_list
,
47 std::vector
<sync_pb::SessionSpecifics
>* tabs
);
53 DISALLOW_COPY_AND_ASSIGN(SessionSyncTestHelper
);
56 } // namespace browser_sync
58 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_SYNC_TEST_HELPER_H_