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

Side by Side Diff: chrome/browser/sync/glue/synced_session_tracker_unittest.cc

Issue 1361613002: Move all core files in //components/sessions into core/ subdir (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "chrome/browser/sync/glue/synced_session_tracker.h" 12 #include "chrome/browser/sync/glue/synced_session_tracker.h"
13 #include "components/sessions/serialized_navigation_entry_test_helper.h" 13 #include "components/sessions/core/serialized_navigation_entry_test_helper.h"
14 #include "components/sessions/session_types.h" 14 #include "components/sessions/core/session_types.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) {
22 SyncedSessionTracker tracker; 22 SyncedSessionTracker tracker;
23 sync_driver::SyncedSession* session1 = tracker.GetSession("tag"); 23 sync_driver::SyncedSession* session1 = tracker.GetSession("tag");
24 sync_driver::SyncedSession* session2 = tracker.GetSession("tag2"); 24 sync_driver::SyncedSession* session2 = tracker.GetSession("tag2");
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 ASSERT_EQ(1U, session2->windows[2]->tabs.size()); 293 ASSERT_EQ(1U, session2->windows[2]->tabs.size());
294 ASSERT_EQ(2U, tracker.num_synced_sessions()); 294 ASSERT_EQ(2U, tracker.num_synced_sessions());
295 ASSERT_EQ(4U, tracker.num_synced_tabs(tag1)); 295 ASSERT_EQ(4U, tracker.num_synced_tabs(tag1));
296 ASSERT_EQ(1U, tracker.num_synced_tabs(tag2)); 296 ASSERT_EQ(1U, tracker.num_synced_tabs(tag2));
297 297
298 // All memory should be properly deallocated by destructor for the 298 // All memory should be properly deallocated by destructor for the
299 // SyncedSessionTracker. 299 // SyncedSessionTracker.
300 } 300 }
301 301
302 } // namespace browser_sync 302 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/synced_session_tracker.h ('k') | chrome/browser/sync/glue/synced_session_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698