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 "base/prefs/pref_service.h" |
5 #include "chrome/browser/favicon/favicon_tab_helper.h" | 6 #include "chrome/browser/favicon/favicon_tab_helper.h" |
6 #include "chrome/browser/prefs/pref_service.h" | |
7 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" | 7 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
8 #include "chrome/common/url_constants.h" | 8 #include "chrome/common/url_constants.h" |
| 9 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
9 #include "chrome/test/base/testing_profile.h" | 10 #include "chrome/test/base/testing_profile.h" |
10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | |
11 #include "content/public/browser/navigation_controller.h" | 11 #include "content/public/browser/navigation_controller.h" |
12 #include "content/public/browser/site_instance.h" | 12 #include "content/public/browser/site_instance.h" |
13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
14 #include "content/public/common/referrer.h" | 14 #include "content/public/common/referrer.h" |
15 #include "content/public/test/test_browser_thread.h" | 15 #include "content/public/test/test_browser_thread.h" |
16 #include "content/public/test/test_renderer_host.h" | 16 #include "content/public/test/test_renderer_host.h" |
17 #include "content/public/test/web_contents_tester.h" | 17 #include "content/public/test/web_contents_tester.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 using content::BrowserThread; | 20 using content::BrowserThread; |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 focus_called = wct->GetNumberOfFocusCalls(); | 214 focus_called = wct->GetNumberOfFocusCalls(); |
215 ASSERT_TRUE(controller().CanGoForward()); | 215 ASSERT_TRUE(controller().CanGoForward()); |
216 controller().GoForward(); | 216 controller().GoForward(); |
217 old_rvh = rvh(); | 217 old_rvh = rvh(); |
218 RenderViewHostTester::For(old_rvh)->SendShouldCloseACK(true); | 218 RenderViewHostTester::For(old_rvh)->SendShouldCloseACK(true); |
219 RenderViewHostTester::For( | 219 RenderViewHostTester::For( |
220 pending_rvh())->SendNavigate(next_page_id, next_url); | 220 pending_rvh())->SendNavigate(next_page_id, next_url); |
221 RenderViewHostTester::For(old_rvh)->SimulateSwapOutACK(); | 221 RenderViewHostTester::For(old_rvh)->SimulateSwapOutACK(); |
222 EXPECT_EQ(focus_called, wct->GetNumberOfFocusCalls()); | 222 EXPECT_EQ(focus_called, wct->GetNumberOfFocusCalls()); |
223 } | 223 } |
OLD | NEW |