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" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 EXPECT_TRUE(expected.url == actual.url); | 62 EXPECT_TRUE(expected.url == actual.url); |
63 EXPECT_EQ(expected.title, actual.title); | 63 EXPECT_EQ(expected.title, actual.title); |
64 EXPECT_EQ(expected.state, actual.state); | 64 EXPECT_EQ(expected.state, actual.state); |
65 EXPECT_EQ(expected.transition, actual.transition); | 65 EXPECT_EQ(expected.transition, actual.transition); |
66 EXPECT_EQ(expected.type_mask, actual.type_mask); | 66 EXPECT_EQ(expected.type_mask, actual.type_mask); |
67 } | 67 } |
68 | 68 |
69 void SessionServiceTestHelper::AssertSingleWindowWithSingleTab( | 69 void SessionServiceTestHelper::AssertSingleWindowWithSingleTab( |
70 const std::vector<SessionWindow*>& windows, | 70 const std::vector<SessionWindow*>& windows, |
71 int nav_count) { | 71 int nav_count) { |
72 EXPECT_EQ(1, windows.size()); | 72 ASSERT_EQ(1, windows.size()); |
73 EXPECT_EQ(1, windows[0]->tabs.size()); | 73 EXPECT_EQ(1, windows[0]->tabs.size()); |
74 EXPECT_EQ(nav_count, windows[0]->tabs[0]->navigations.size()); | 74 EXPECT_EQ(nav_count, windows[0]->tabs[0]->navigations.size()); |
75 } | 75 } |
76 | 76 |
77 SessionBackend* SessionServiceTestHelper::backend() { | 77 SessionBackend* SessionServiceTestHelper::backend() { |
78 return service_->backend_.get(); | 78 return service_->backend_.get(); |
79 } | 79 } |
80 | 80 |
OLD | NEW |