OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/favicon/favicon_tab_helper.h" | 5 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 6 #include "chrome/browser/prefs/pref_service.h" |
6 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" | 7 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
7 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
8 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" | 9 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" |
9 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
10 #include "chrome/test/base/testing_profile.h" | 11 #include "chrome/test/base/testing_profile.h" |
11 #include "content/public/browser/navigation_controller.h" | 12 #include "content/public/browser/navigation_controller.h" |
12 #include "content/public/browser/site_instance.h" | 13 #include "content/public/browser/site_instance.h" |
13 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
14 #include "content/public/common/referrer.h" | 15 #include "content/public/common/referrer.h" |
15 #include "content/test/test_browser_thread.h" | 16 #include "content/test/test_browser_thread.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 focus_called = wct->GetNumberOfFocusCalls(); | 206 focus_called = wct->GetNumberOfFocusCalls(); |
206 ASSERT_TRUE(controller().CanGoForward()); | 207 ASSERT_TRUE(controller().CanGoForward()); |
207 controller().GoForward(); | 208 controller().GoForward(); |
208 old_rvh = rvh(); | 209 old_rvh = rvh(); |
209 RenderViewHostTester::For(old_rvh)->SendShouldCloseACK(true); | 210 RenderViewHostTester::For(old_rvh)->SendShouldCloseACK(true); |
210 RenderViewHostTester::For( | 211 RenderViewHostTester::For( |
211 pending_rvh())->SendNavigate(next_page_id, next_url); | 212 pending_rvh())->SendNavigate(next_page_id, next_url); |
212 RenderViewHostTester::For(old_rvh)->SimulateSwapOutACK(); | 213 RenderViewHostTester::For(old_rvh)->SimulateSwapOutACK(); |
213 EXPECT_EQ(focus_called, wct->GetNumberOfFocusCalls()); | 214 EXPECT_EQ(focus_called, wct->GetNumberOfFocusCalls()); |
214 } | 215 } |
OLD | NEW |