| 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/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/browser/ui/tab_contents/tab_contents_wrapper.h" | 8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 9 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" | 9 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" |
| 10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| 11 #include "chrome/test/base/testing_profile.h" | 11 #include "chrome/test/base/testing_profile.h" |
| 12 #include "content/public/browser/navigation_controller.h" | 12 #include "content/public/browser/navigation_controller.h" |
| 13 #include "content/public/browser/site_instance.h" | 13 #include "content/public/browser/site_instance.h" |
| 14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 15 #include "content/public/common/referrer.h" | 15 #include "content/public/common/referrer.h" |
| 16 #include "content/public/test/test_browser_thread.h" | 16 #include "content/public/test/test_browser_thread.h" |
| 17 #include "content/test/test_renderer_host.h" | 17 #include "content/public/test/test_renderer_host.h" |
| 18 #include "content/test/web_contents_tester.h" | 18 #include "content/public/test/web_contents_tester.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 | 20 |
| 21 using content::BrowserThread; | 21 using content::BrowserThread; |
| 22 using content::NavigationController; | 22 using content::NavigationController; |
| 23 using content::RenderViewHost; | 23 using content::RenderViewHost; |
| 24 using content::RenderViewHostTester; | 24 using content::RenderViewHostTester; |
| 25 using content::SiteInstance; | 25 using content::SiteInstance; |
| 26 using content::WebContents; | 26 using content::WebContents; |
| 27 using content::WebContentsTester; | 27 using content::WebContentsTester; |
| 28 | 28 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 focus_called = wct->GetNumberOfFocusCalls(); | 206 focus_called = wct->GetNumberOfFocusCalls(); |
| 207 ASSERT_TRUE(controller().CanGoForward()); | 207 ASSERT_TRUE(controller().CanGoForward()); |
| 208 controller().GoForward(); | 208 controller().GoForward(); |
| 209 old_rvh = rvh(); | 209 old_rvh = rvh(); |
| 210 RenderViewHostTester::For(old_rvh)->SendShouldCloseACK(true); | 210 RenderViewHostTester::For(old_rvh)->SendShouldCloseACK(true); |
| 211 RenderViewHostTester::For( | 211 RenderViewHostTester::For( |
| 212 pending_rvh())->SendNavigate(next_page_id, next_url); | 212 pending_rvh())->SendNavigate(next_page_id, next_url); |
| 213 RenderViewHostTester::For(old_rvh)->SimulateSwapOutACK(); | 213 RenderViewHostTester::For(old_rvh)->SimulateSwapOutACK(); |
| 214 EXPECT_EQ(focus_called, wct->GetNumberOfFocusCalls()); | 214 EXPECT_EQ(focus_called, wct->GetNumberOfFocusCalls()); |
| 215 } | 215 } |
| OLD | NEW |