OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 // These are only used for commented out tests. If someone wants to enable | 11 // These are only used for commented out tests. If someone wants to enable |
12 // them, they should be moved to chrome first. | 12 // them, they should be moved to chrome first. |
13 // #include "chrome/browser/history/history.h" | 13 // #include "chrome/browser/history/history.h" |
14 // #include "chrome/browser/profiles/profile_manager.h" | 14 // #include "chrome/browser/profiles/profile_manager.h" |
15 // #include "chrome/browser/sessions/session_service.h" | 15 // #include "chrome/browser/sessions/session_service.h" |
16 // #include "chrome/browser/sessions/session_service_factory.h" | 16 // #include "chrome/browser/sessions/session_service_factory.h" |
17 // #include "chrome/browser/sessions/session_service_test_helper.h" | 17 // #include "chrome/browser/sessions/session_service_test_helper.h" |
18 // #include "chrome/browser/sessions/session_types.h" | 18 // #include "chrome/browser/sessions/session_types.h" |
| 19 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
19 #include "chrome/test/base/testing_profile.h" | 20 #include "chrome/test/base/testing_profile.h" |
20 #include "content/browser/renderer_host/test_render_view_host.h" | |
21 #include "content/browser/site_instance.h" | 21 #include "content/browser/site_instance.h" |
22 #include "content/browser/tab_contents/navigation_controller.h" | 22 #include "content/browser/tab_contents/navigation_controller.h" |
23 #include "content/browser/tab_contents/navigation_details.h" | 23 #include "content/browser/tab_contents/navigation_details.h" |
24 #include "content/browser/tab_contents/navigation_entry.h" | 24 #include "content/browser/tab_contents/navigation_entry.h" |
25 #include "content/browser/tab_contents/tab_contents.h" | 25 #include "content/browser/tab_contents/tab_contents.h" |
26 #include "content/browser/tab_contents/tab_contents_delegate.h" | 26 #include "content/browser/tab_contents/tab_contents_delegate.h" |
27 #include "content/browser/tab_contents/test_tab_contents.h" | 27 #include "content/browser/tab_contents/test_tab_contents.h" |
28 #include "content/common/notification_registrar.h" | 28 #include "content/common/notification_registrar.h" |
29 #include "content/common/view_messages.h" | 29 #include "content/common/view_messages.h" |
30 #include "content/test/test_notification_tracker.h" | 30 #include "content/test/test_notification_tracker.h" |
31 #include "net/base/net_util.h" | 31 #include "net/base/net_util.h" |
32 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
33 #include "webkit/glue/webkit_glue.h" | 33 #include "webkit/glue/webkit_glue.h" |
34 | 34 |
35 using base::Time; | 35 using base::Time; |
36 | 36 |
37 // NavigationControllerTest ---------------------------------------------------- | 37 // NavigationControllerTest ---------------------------------------------------- |
38 | 38 |
39 class NavigationControllerTest : public RenderViewHostTestHarness { | 39 class NavigationControllerTest : public ChromeRenderViewHostTestHarness { |
40 public: | 40 public: |
41 NavigationControllerTest() {} | 41 NavigationControllerTest() {} |
42 }; | 42 }; |
43 | 43 |
44 void RegisterForAllNavNotifications(TestNotificationTracker* tracker, | 44 void RegisterForAllNavNotifications(TestNotificationTracker* tracker, |
45 NavigationController* controller) { | 45 NavigationController* controller) { |
46 tracker->ListenFor(content::NOTIFICATION_NAV_ENTRY_COMMITTED, | 46 tracker->ListenFor(content::NOTIFICATION_NAV_ENTRY_COMMITTED, |
47 Source<NavigationController>(controller)); | 47 Source<NavigationController>(controller)); |
48 tracker->ListenFor(content::NOTIFICATION_NAV_LIST_PRUNED, | 48 tracker->ListenFor(content::NOTIFICATION_NAV_LIST_PRUNED, |
49 Source<NavigationController>(controller)); | 49 Source<NavigationController>(controller)); |
(...skipping 2257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2307 TabNavigation nav(0, url0, GURL(), string16(), | 2307 TabNavigation nav(0, url0, GURL(), string16(), |
2308 webkit_glue::CreateHistoryStateForURL(url0), | 2308 webkit_glue::CreateHistoryStateForURL(url0), |
2309 PageTransition::LINK); | 2309 PageTransition::LINK); |
2310 session_helper_.AssertNavigationEquals(nav, | 2310 session_helper_.AssertNavigationEquals(nav, |
2311 windows_[0]->tabs[0]->navigations[0]); | 2311 windows_[0]->tabs[0]->navigations[0]); |
2312 nav.set_url(url2); | 2312 nav.set_url(url2); |
2313 session_helper_.AssertNavigationEquals(nav, | 2313 session_helper_.AssertNavigationEquals(nav, |
2314 windows_[0]->tabs[0]->navigations[1]); | 2314 windows_[0]->tabs[0]->navigations[1]); |
2315 } | 2315 } |
2316 */ | 2316 */ |
OLD | NEW |