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

Unified Diff: chrome/browser/sync/test/integration/sessions_helper.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, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/test/integration/sessions_helper.cc
diff --git a/chrome/browser/sync/test/integration/sessions_helper.cc b/chrome/browser/sync/test/integration/sessions_helper.cc
index 3043ff9be4fc830924a8c4f5a7857d3bbab26dbd..da843cb6369e394a360ff4861a4cf7390336cbce 100644
--- a/chrome/browser/sync/test/integration/sessions_helper.cc
+++ b/chrome/browser/sync/test/integration/sessions_helper.cc
@@ -10,7 +10,6 @@
#include "base/test/test_timeouts.h"
#include "base/time.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sessions/session_types_test_helper.h"
#include "chrome/browser/sync/glue/session_model_associator.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
@@ -69,7 +68,7 @@ bool ModelAssociatorHasTabWithUrl(int index, const GURL& url) {
}
int nav_index;
- TabNavigation nav;
+ sessions::SerializedNavigationEntry nav;
for (SessionWindowMap::const_iterator it =
local_session->windows.begin();
it != local_session->windows.end(); ++it) {
@@ -88,8 +87,7 @@ bool ModelAssociatorHasTabWithUrl(int index, const GURL& url) {
nav = (*tab_it)->navigations[nav_index];
if (nav.virtual_url() == url) {
DVLOG(1) << "Found tab with url " << url.spec();
- DVLOG(1) << "Timestamp is "
- << SessionTypesTestHelper::GetTimestamp(nav).ToInternalValue();
+ DVLOG(1) << "Timestamp is " << nav.timestamp().ToInternalValue();
if (nav.title().empty()) {
DVLOG(1) << "Title empty -- tab hasn't finished loading yet";
continue;
@@ -234,19 +232,18 @@ void SortSyncedSessions(SyncedSessionVector* sessions) {
CompareSyncedSessions);
}
-bool NavigationEquals(const TabNavigation& expected,
- const TabNavigation& actual) {
+bool NavigationEquals(const sessions::SerializedNavigationEntry& expected,
+ const sessions::SerializedNavigationEntry& actual) {
if (expected.virtual_url() != actual.virtual_url()) {
LOG(ERROR) << "Expected url " << expected.virtual_url()
<< ", actual " << actual.virtual_url();
return false;
}
- if (SessionTypesTestHelper::GetReferrer(expected).url !=
- SessionTypesTestHelper::GetReferrer(actual).url) {
+ if (expected.referrer().url != actual.referrer().url) {
LOG(ERROR) << "Expected referrer "
- << SessionTypesTestHelper::GetReferrer(expected).url
+ << expected.referrer().url
<< ", actual "
- << SessionTypesTestHelper::GetReferrer(actual).url;
+ << actual.referrer().url;
return false;
}
if (expected.title() != actual.title()) {
@@ -254,12 +251,11 @@ bool NavigationEquals(const TabNavigation& expected,
<< ", actual " << actual.title();
return false;
}
- if (SessionTypesTestHelper::GetTransitionType(expected) !=
- SessionTypesTestHelper::GetTransitionType(actual)) {
+ if (expected.transition_type() != actual.transition_type()) {
LOG(ERROR) << "Expected transition "
- << SessionTypesTestHelper::GetTransitionType(expected)
+ << expected.transition_type()
<< ", actual "
- << SessionTypesTestHelper::GetTransitionType(actual);
+ << actual.transition_type();
return false;
}
return true;

Powered by Google App Engine
This is Rietveld 408576698