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 "chrome/browser/sync/test/integration/sessions_helper.h" | 5 #include "chrome/browser/sync/test/integration/sessions_helper.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 CompareSyncedSessions); | 282 CompareSyncedSessions); |
283 } | 283 } |
284 | 284 |
285 bool NavigationEquals(const sessions::SerializedNavigationEntry& expected, | 285 bool NavigationEquals(const sessions::SerializedNavigationEntry& expected, |
286 const sessions::SerializedNavigationEntry& actual) { | 286 const sessions::SerializedNavigationEntry& actual) { |
287 if (expected.virtual_url() != actual.virtual_url()) { | 287 if (expected.virtual_url() != actual.virtual_url()) { |
288 LOG(ERROR) << "Expected url " << expected.virtual_url() | 288 LOG(ERROR) << "Expected url " << expected.virtual_url() |
289 << ", actual " << actual.virtual_url(); | 289 << ", actual " << actual.virtual_url(); |
290 return false; | 290 return false; |
291 } | 291 } |
292 if (expected.referrer().url != actual.referrer().url) { | 292 if (expected.referrer_url() != actual.referrer_url()) { |
293 LOG(ERROR) << "Expected referrer " | 293 LOG(ERROR) << "Expected referrer " |
294 << expected.referrer().url | 294 << expected.referrer_url() |
295 << ", actual " | 295 << ", actual " |
296 << actual.referrer().url; | 296 << actual.referrer_url(); |
297 return false; | 297 return false; |
298 } | 298 } |
299 if (expected.title() != actual.title()) { | 299 if (expected.title() != actual.title()) { |
300 LOG(ERROR) << "Expected title " << expected.title() | 300 LOG(ERROR) << "Expected title " << expected.title() |
301 << ", actual " << actual.title(); | 301 << ", actual " << actual.title(); |
302 return false; | 302 return false; |
303 } | 303 } |
304 if (expected.transition_type() != actual.transition_type()) { | 304 if (expected.transition_type() != actual.transition_type()) { |
305 LOG(ERROR) << "Expected transition " | 305 LOG(ERROR) << "Expected transition " |
306 << expected.transition_type() | 306 << expected.transition_type() |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 return !checker.TimedOut(); | 402 return !checker.TimedOut(); |
403 } | 403 } |
404 | 404 |
405 void DeleteForeignSession(int index, std::string session_tag) { | 405 void DeleteForeignSession(int index, std::string session_tag) { |
406 ProfileSyncServiceFactory::GetInstance()->GetForProfile( | 406 ProfileSyncServiceFactory::GetInstance()->GetForProfile( |
407 test()->GetProfile(index))-> | 407 test()->GetProfile(index))-> |
408 GetOpenTabsUIDelegate()->DeleteForeignSession(session_tag); | 408 GetOpenTabsUIDelegate()->DeleteForeignSession(session_tag); |
409 } | 409 } |
410 | 410 |
411 } // namespace sessions_helper | 411 } // namespace sessions_helper |
OLD | NEW |