| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/sessions/session_service_test_helper.h" | 5 #include "chrome/browser/sessions/session_service_test_helper.h" |
| 6 | 6 |
| 7 #include "base/scoped_vector.h" |
| 7 #include "chrome/browser/sessions/session_backend.h" | 8 #include "chrome/browser/sessions/session_backend.h" |
| 8 #include "chrome/browser/sessions/session_id.h" | 9 #include "chrome/browser/sessions/session_id.h" |
| 9 #include "chrome/browser/sessions/session_service.h" | 10 #include "chrome/browser/sessions/session_service.h" |
| 10 #include "chrome/browser/sessions/session_types.h" | 11 #include "chrome/browser/sessions/session_types.h" |
| 11 #include "chrome/common/scoped_vector.h" | |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 using base::Time; | 14 using base::Time; |
| 15 | 15 |
| 16 void SessionServiceTestHelper::RestoreSessionFromCommands( | 16 void SessionServiceTestHelper::RestoreSessionFromCommands( |
| 17 const std::vector<SessionCommand*>& commands, | 17 const std::vector<SessionCommand*>& commands, |
| 18 std::vector<SessionWindow*>* valid_windows) { | 18 std::vector<SessionWindow*>* valid_windows) { |
| 19 service()->RestoreSessionFromCommands(commands, valid_windows); | 19 service()->RestoreSessionFromCommands(commands, valid_windows); |
| 20 } | 20 } |
| 21 | 21 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 const std::vector<SessionWindow*>& windows, | 74 const std::vector<SessionWindow*>& windows, |
| 75 size_t nav_count) { | 75 size_t nav_count) { |
| 76 ASSERT_EQ(1U, windows.size()); | 76 ASSERT_EQ(1U, windows.size()); |
| 77 EXPECT_EQ(1U, windows[0]->tabs.size()); | 77 EXPECT_EQ(1U, windows[0]->tabs.size()); |
| 78 EXPECT_EQ(nav_count, windows[0]->tabs[0]->navigations.size()); | 78 EXPECT_EQ(nav_count, windows[0]->tabs[0]->navigations.size()); |
| 79 } | 79 } |
| 80 | 80 |
| 81 SessionBackend* SessionServiceTestHelper::backend() { | 81 SessionBackend* SessionServiceTestHelper::backend() { |
| 82 return service_->backend(); | 82 return service_->backend(); |
| 83 } | 83 } |
| OLD | NEW |