| 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 "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "chrome/browser/browser_type.h" | 8 #include "chrome/browser/browser_type.h" |
| 9 #include "chrome/browser/navigation_controller.h" | 9 #include "chrome/browser/navigation_controller.h" |
| 10 #include "chrome/browser/navigation_entry.h" | 10 #include "chrome/browser/navigation_entry.h" |
| 11 #include "chrome/browser/profile_manager.h" | 11 #include "chrome/browser/profile_manager.h" |
| 12 #include "chrome/browser/history/history.h" | 12 #include "chrome/browser/history/history.h" |
| 13 #include "chrome/browser/session_service.h" | 13 #include "chrome/browser/session_service.h" |
| 14 #include "chrome/browser/session_service_test_helper.h" | 14 #include "chrome/browser/session_service_test_helper.h" |
| 15 #include "chrome/browser/tab_contents.h" | 15 #include "chrome/browser/tab_contents.h" |
| 16 #include "chrome/browser/tab_contents_delegate.h" | 16 #include "chrome/browser/tab_contents_delegate.h" |
| 17 #include "chrome/browser/tab_contents_factory.h" | 17 #include "chrome/browser/tab_contents_factory.h" |
| 18 #include "chrome/common/notification_registrar.h" | 18 #include "chrome/common/notification_registrar.h" |
| 19 #include "chrome/common/notification_types.h" | 19 #include "chrome/common/notification_types.h" |
| 20 #include "chrome/common/stl_util-inl.h" | 20 #include "chrome/common/stl_util-inl.h" |
| 21 #include "chrome/test/test_notification_tracker.h" | 21 #include "chrome/test/test_notification_tracker.h" |
| 22 #include "chrome/test/test_tab_contents.h" | 22 #include "chrome/test/test_tab_contents.h" |
| 23 #include "chrome/test/testing_profile.h" | 23 #include "chrome/test/testing_profile.h" |
| 24 #include "net/base/net_util.h" | 24 #include "net/base/net_util.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| 26 | 26 |
| 27 using base::Time; |
| 28 |
| 27 namespace { | 29 namespace { |
| 28 | 30 |
| 29 // NavigationControllerTest ---------------------------------------------------- | 31 // NavigationControllerTest ---------------------------------------------------- |
| 30 | 32 |
| 31 class NavigationControllerTest : public testing::Test, | 33 class NavigationControllerTest : public testing::Test, |
| 32 public TabContentsDelegate { | 34 public TabContentsDelegate { |
| 33 public: | 35 public: |
| 34 NavigationControllerTest() | 36 NavigationControllerTest() |
| 35 : contents(NULL), | 37 : contents(NULL), |
| 36 profile(NULL), | 38 profile(NULL), |
| (...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 | 1550 |
| 1549 helper_.AssertSingleWindowWithSingleTab(windows_, 2); | 1551 helper_.AssertSingleWindowWithSingleTab(windows_, 2); |
| 1550 helper_.AssertTabEquals(0, 1, 2, *(windows_[0]->tabs[0])); | 1552 helper_.AssertTabEquals(0, 1, 2, *(windows_[0]->tabs[0])); |
| 1551 | 1553 |
| 1552 TabNavigation nav(0, url0, std::wstring(), std::string(), | 1554 TabNavigation nav(0, url0, std::wstring(), std::string(), |
| 1553 PageTransition::LINK); | 1555 PageTransition::LINK); |
| 1554 helper_.AssertNavigationEquals(nav, windows_[0]->tabs[0]->navigations[0]); | 1556 helper_.AssertNavigationEquals(nav, windows_[0]->tabs[0]->navigations[0]); |
| 1555 nav.url = url2; | 1557 nav.url = url2; |
| 1556 helper_.AssertNavigationEquals(nav, windows_[0]->tabs[0]->navigations[1]); | 1558 helper_.AssertNavigationEquals(nav, windows_[0]->tabs[0]->navigations[1]); |
| 1557 } | 1559 } |
| OLD | NEW |