OLD | NEW |
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 #include <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "chrome/browser/sessions/session_types.h" | 12 #include "chrome/browser/sessions/session_types.h" |
13 #include "chrome/browser/sync/glue/synced_session_tracker.h" | 13 #include "chrome/browser/sync/glue/synced_session_tracker.h" |
14 #include "components/sessions/serialized_navigation_entry_test_helper.h" | 14 #include "components/sessions/serialized_navigation_entry_test_helper.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace browser_sync { | 17 namespace browser_sync { |
18 | 18 |
19 typedef testing::Test SyncedSessionTrackerTest; | 19 typedef testing::Test SyncedSessionTrackerTest; |
20 | 20 |
21 TEST_F(SyncedSessionTrackerTest, GetSession) { | 21 TEST_F(SyncedSessionTrackerTest, GetSession) { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 ASSERT_EQ(1U, session2->windows[2]->tabs.size()); | 236 ASSERT_EQ(1U, session2->windows[2]->tabs.size()); |
237 ASSERT_EQ(2U, tracker.num_synced_sessions()); | 237 ASSERT_EQ(2U, tracker.num_synced_sessions()); |
238 ASSERT_EQ(4U, tracker.num_synced_tabs(tag1)); | 238 ASSERT_EQ(4U, tracker.num_synced_tabs(tag1)); |
239 ASSERT_EQ(1U, tracker.num_synced_tabs(tag2)); | 239 ASSERT_EQ(1U, tracker.num_synced_tabs(tag2)); |
240 | 240 |
241 // All memory should be properly deallocated by destructor for the | 241 // All memory should be properly deallocated by destructor for the |
242 // SyncedSessionTracker. | 242 // SyncedSessionTracker. |
243 } | 243 } |
244 | 244 |
245 } // namespace browser_sync | 245 } // namespace browser_sync |
OLD | NEW |