| 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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
| 6 #include "content/browser/browser_thread_impl.h" | 6 #include "content/browser/browser_thread_impl.h" |
| 7 #include "content/browser/browser_url_handler.h" | 7 #include "content/browser/browser_url_handler.h" |
| 8 #include "content/browser/mock_content_browser_client.h" | 8 #include "content/browser/mock_content_browser_client.h" |
| 9 #include "content/browser/renderer_host/test_render_view_host.h" | 9 #include "content/browser/renderer_host/test_render_view_host.h" |
| 10 #include "content/browser/site_instance_impl.h" | 10 #include "content/browser/site_instance_impl.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "googleurl/src/url_util.h" | 27 #include "googleurl/src/url_util.h" |
| 28 #include "ui/base/javascript_message_type.h" | 28 #include "ui/base/javascript_message_type.h" |
| 29 #include "webkit/glue/webkit_glue.h" | 29 #include "webkit/glue/webkit_glue.h" |
| 30 | 30 |
| 31 using content::BrowserContext; | 31 using content::BrowserContext; |
| 32 using content::BrowserThread; | 32 using content::BrowserThread; |
| 33 using content::BrowserThreadImpl; | 33 using content::BrowserThreadImpl; |
| 34 using content::NavigationController; | 34 using content::NavigationController; |
| 35 using content::NavigationEntry; | 35 using content::NavigationEntry; |
| 36 using content::NavigationEntryImpl; | 36 using content::NavigationEntryImpl; |
| 37 using content::RenderViewHost; |
| 38 using content::RenderViewHostImpl; |
| 37 using content::SiteInstance; | 39 using content::SiteInstance; |
| 40 using content::TestRenderViewHost; |
| 38 using content::WebContents; | 41 using content::WebContents; |
| 39 using content::WebUI; | 42 using content::WebUI; |
| 40 using content::WebUIController; | 43 using content::WebUIController; |
| 41 | 44 |
| 42 namespace { | 45 namespace { |
| 43 | 46 |
| 44 const char kChromeUISchemeButNotWebUIURL[] = "chrome://not-webui"; | 47 const char kChromeUISchemeButNotWebUIURL[] = "chrome://not-webui"; |
| 45 | 48 |
| 46 class RenderViewHostManagerTestWebUIControllerFactory | 49 class RenderViewHostManagerTestWebUIControllerFactory |
| 47 : public content::WebUIControllerFactory { | 50 : public content::WebUIControllerFactory { |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 | 777 |
| 775 // We should be able to navigate forward. | 778 // We should be able to navigate forward. |
| 776 contents()->GetController().GoForward(); | 779 contents()->GetController().GoForward(); |
| 777 contents()->ProceedWithCrossSiteNavigation(); | 780 contents()->ProceedWithCrossSiteNavigation(); |
| 778 const NavigationEntry* entry2 = contents()->GetController().GetPendingEntry(); | 781 const NavigationEntry* entry2 = contents()->GetController().GetPendingEntry(); |
| 779 rvh2->SendNavigate(entry2->GetPageID(), entry2->GetURL()); | 782 rvh2->SendNavigate(entry2->GetPageID(), entry2->GetURL()); |
| 780 EXPECT_EQ(rvh2, rvh()); | 783 EXPECT_EQ(rvh2, rvh()); |
| 781 EXPECT_FALSE(rvh2->is_swapped_out()); | 784 EXPECT_FALSE(rvh2->is_swapped_out()); |
| 782 EXPECT_TRUE(rvh1->is_swapped_out()); | 785 EXPECT_TRUE(rvh1->is_swapped_out()); |
| 783 } | 786 } |
| OLD | NEW |