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

Side by Side Diff: chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc

Issue 14497003: Moves TabNavigation into components/sessions and renames (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really remove webkit_support Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/test/integration/sessions_helper.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/memory/scoped_vector.h" 5 #include "base/memory/scoped_vector.h"
6 #include "chrome/browser/history/history_types.h" 6 #include "chrome/browser/history/history_types.h"
7 #include "chrome/browser/sessions/session_service.h" 7 #include "chrome/browser/sessions/session_service.h"
8 #include "chrome/browser/sessions/session_types.h" 8 #include "chrome/browser/sessions/session_types.h"
9 #include "chrome/browser/sessions/session_types_test_helper.h"
10 #include "chrome/browser/sync/profile_sync_service_harness.h" 9 #include "chrome/browser/sync/profile_sync_service_harness.h"
11 #include "chrome/browser/sync/test/integration/sessions_helper.h" 10 #include "chrome/browser/sync/test/integration/sessions_helper.h"
12 #include "chrome/browser/sync/test/integration/sync_test.h" 11 #include "chrome/browser/sync/test/integration/sync_test.h"
13 #include "chrome/browser/sync/test/integration/typed_urls_helper.h" 12 #include "chrome/browser/sync/test/integration/typed_urls_helper.h"
14 #include "sync/util/time.h" 13 #include "sync/util/time.h"
15 14
16 using sessions_helper::CheckInitialState; 15 using sessions_helper::CheckInitialState;
17 using sessions_helper::GetLocalWindows; 16 using sessions_helper::GetLocalWindows;
18 using sessions_helper::GetSessionData; 17 using sessions_helper::GetSessionData;
19 using sessions_helper::OpenTabAndGetLocalWindows; 18 using sessions_helper::OpenTabAndGetLocalWindows;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 const GURL url("about:version"); 72 const GURL url("about:version");
74 73
75 ScopedWindowMap windows; 74 ScopedWindowMap windows;
76 ASSERT_TRUE(OpenTabAndGetLocalWindows(0, url, windows.GetMutable())); 75 ASSERT_TRUE(OpenTabAndGetLocalWindows(0, url, windows.GetMutable()));
77 76
78 int found_navigations = 0; 77 int found_navigations = 0;
79 for (SessionWindowMap::const_iterator it = windows.Get()->begin(); 78 for (SessionWindowMap::const_iterator it = windows.Get()->begin();
80 it != windows.Get()->end(); ++it) { 79 it != windows.Get()->end(); ++it) {
81 for (std::vector<SessionTab*>::const_iterator it2 = 80 for (std::vector<SessionTab*>::const_iterator it2 =
82 it->second->tabs.begin(); it2 != it->second->tabs.end(); ++it2) { 81 it->second->tabs.begin(); it2 != it->second->tabs.end(); ++it2) {
83 for (std::vector<TabNavigation>::const_iterator it3 = 82 for (std::vector<sessions::SerializedNavigationEntry>::const_iterator
84 (*it2)->navigations.begin(); 83 it3 = (*it2)->navigations.begin();
85 it3 != (*it2)->navigations.end(); ++it3) { 84 it3 != (*it2)->navigations.end(); ++it3) {
86 const base::Time timestamp = SessionTypesTestHelper::GetTimestamp(*it3); 85 const base::Time timestamp = it3->timestamp();
87 86
88 history::URLRow virtual_row; 87 history::URLRow virtual_row;
89 ASSERT_TRUE(GetUrlFromClient(0, it3->virtual_url(), &virtual_row)); 88 ASSERT_TRUE(GetUrlFromClient(0, it3->virtual_url(), &virtual_row));
90 const base::Time history_timestamp = virtual_row.last_visit(); 89 const base::Time history_timestamp = virtual_row.last_visit();
91 90
92 ASSERT_EQ(timestamp, history_timestamp); 91 ASSERT_EQ(timestamp, history_timestamp);
93 ++found_navigations; 92 ++found_navigations;
94 } 93 }
95 } 94 }
96 } 95 }
97 ASSERT_EQ(1, found_navigations); 96 ASSERT_EQ(1, found_navigations);
98 } 97 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/sessions_helper.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698