| 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/session_service_test_helper.h" | 5 #include "chrome/browser/session_service_test_helper.h" |
| 6 | 6 |
| 7 #include "chrome/browser/session_backend.h" | 7 #include "chrome/browser/session_backend.h" |
| 8 #include "chrome/browser/session_service.h" | 8 #include "chrome/browser/session_service.h" |
| 9 #include "chrome/common/scoped_vector.h" | 9 #include "chrome/common/scoped_vector.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 using base::Time; |
| 13 |
| 12 void SessionServiceTestHelper::RestoreSessionFromCommands( | 14 void SessionServiceTestHelper::RestoreSessionFromCommands( |
| 13 const std::vector<SessionCommand*>& commands, | 15 const std::vector<SessionCommand*>& commands, |
| 14 std::vector<SessionWindow*>* valid_windows) { | 16 std::vector<SessionWindow*>* valid_windows) { |
| 15 service()->RestoreSessionFromCommands(commands, valid_windows); | 17 service()->RestoreSessionFromCommands(commands, valid_windows); |
| 16 } | 18 } |
| 17 | 19 |
| 18 void SessionServiceTestHelper::PrepareTabInWindow(const SessionID& window_id, | 20 void SessionServiceTestHelper::PrepareTabInWindow(const SessionID& window_id, |
| 19 const SessionID& tab_id, | 21 const SessionID& tab_id, |
| 20 int visual_index, | 22 int visual_index, |
| 21 bool select) { | 23 bool select) { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 int nav_count) { | 72 int nav_count) { |
| 71 ASSERT_EQ(1, windows.size()); | 73 ASSERT_EQ(1, windows.size()); |
| 72 EXPECT_EQ(1, windows[0]->tabs.size()); | 74 EXPECT_EQ(1, windows[0]->tabs.size()); |
| 73 EXPECT_EQ(nav_count, windows[0]->tabs[0]->navigations.size()); | 75 EXPECT_EQ(nav_count, windows[0]->tabs[0]->navigations.size()); |
| 74 } | 76 } |
| 75 | 77 |
| 76 SessionBackend* SessionServiceTestHelper::backend() { | 78 SessionBackend* SessionServiceTestHelper::backend() { |
| 77 return service_->backend_.get(); | 79 return service_->backend_.get(); |
| 78 } | 80 } |
| 79 | 81 |
| OLD | NEW |