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: components/sync_sessions/tab_node_pool_unittest.cc

Issue 2343463003: [Sync] Fix namespaces for the sync_sessions component. (Closed)
Patch Set: Fix gn. Created 4 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/sync_sessions/tab_node_pool.h" 5 #include "components/sync_sessions/tab_node_pool.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "components/sync/api/sync_change.h" 11 #include "components/sync/api/sync_change.h"
12 #include "components/sync/protocol/session_specifics.pb.h" 12 #include "components/sync/protocol/session_specifics.pb.h"
13 #include "components/sync/protocol/sync.pb.h" 13 #include "components/sync/protocol/sync.pb.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace browser_sync { 16 namespace sync_sessions {
17 17
18 class SyncTabNodePoolTest : public testing::Test { 18 class SyncTabNodePoolTest : public testing::Test {
19 protected: 19 protected:
20 SyncTabNodePoolTest() { pool_.SetMachineTag("tag"); } 20 SyncTabNodePoolTest() { pool_.SetMachineTag("tag"); }
21 21
22 int GetMaxUsedTabNodeId() const { return pool_.max_used_tab_node_id_; } 22 int GetMaxUsedTabNodeId() const { return pool_.max_used_tab_node_id_; }
23 23
24 void AddFreeTabNodes(size_t size, const int node_ids[]); 24 void AddFreeTabNodes(size_t size, const int node_ids[]);
25 25
26 TabNodePool pool_; 26 TabNodePool pool_;
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // Freeing the last sync node should drop the free nodes to 254 // Freeing the last sync node should drop the free nodes to
255 // kFreeNodesLowWatermark. 255 // kFreeNodesLowWatermark.
256 pool_.FreeTabNode(last_sync_id, &changes); 256 pool_.FreeTabNode(last_sync_id, &changes);
257 EXPECT_FALSE(pool_.Empty()); 257 EXPECT_FALSE(pool_.Empty());
258 EXPECT_TRUE(pool_.Full()); 258 EXPECT_TRUE(pool_.Full());
259 EXPECT_EQ(TabNodePool::kFreeNodesLowWatermark, pool_.Capacity()); 259 EXPECT_EQ(TabNodePool::kFreeNodesLowWatermark, pool_.Capacity());
260 } 260 }
261 261
262 } // namespace 262 } // namespace
263 263
264 } // namespace browser_sync 264 } // namespace sync_sessions
OLDNEW
« no previous file with comments | « components/sync_sessions/tab_node_pool.cc ('k') | ios/chrome/browser/sync/ios_chrome_sync_client.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698