| 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/logging.h" | 5 #include "base/logging.h" |
| 6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
| 7 #include "content/browser/renderer_host/render_view_host_impl.h" | 7 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 8 #include "content/browser/renderer_host/test_render_view_host.h" | 8 #include "content/browser/renderer_host/test_render_view_host.h" |
| 9 #include "content/browser/site_instance_impl.h" | 9 #include "content/browser/site_instance_impl.h" |
| 10 #include "content/browser/web_contents/interstitial_page_impl.h" | 10 #include "content/browser/web_contents/interstitial_page_impl.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "googleurl/src/url_util.h" | 29 #include "googleurl/src/url_util.h" |
| 30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
| 31 #include "webkit/glue/webkit_glue.h" | 31 #include "webkit/glue/webkit_glue.h" |
| 32 | 32 |
| 33 using content::BrowserContext; | 33 using content::BrowserContext; |
| 34 using content::BrowserThread; | 34 using content::BrowserThread; |
| 35 using content::InterstitialPage; | 35 using content::InterstitialPage; |
| 36 using content::MockRenderProcessHost; | 36 using content::MockRenderProcessHost; |
| 37 using content::NavigationEntry; | 37 using content::NavigationEntry; |
| 38 using content::NavigationEntryImpl; | 38 using content::NavigationEntryImpl; |
| 39 using content::PasswordForm; |
| 39 using content::SiteInstance; | 40 using content::SiteInstance; |
| 40 using content::RenderViewHost; | 41 using content::RenderViewHost; |
| 41 using content::RenderViewHostImplTestHarness; | 42 using content::RenderViewHostImplTestHarness; |
| 42 using content::TestBrowserThread; | 43 using content::TestBrowserThread; |
| 43 using content::TestRenderViewHost; | 44 using content::TestRenderViewHost; |
| 44 using content::TestWebContents; | 45 using content::TestWebContents; |
| 45 using content::WebContents; | 46 using content::WebContents; |
| 46 using content::WebUI; | 47 using content::WebUI; |
| 47 using content::WebUIController; | 48 using content::WebUIController; |
| 48 using webkit::forms::PasswordForm; | |
| 49 | 49 |
| 50 namespace { | 50 namespace { |
| 51 | 51 |
| 52 class WebContentsImplTestWebUIControllerFactory | 52 class WebContentsImplTestWebUIControllerFactory |
| 53 : public content::WebUIControllerFactory { | 53 : public content::WebUIControllerFactory { |
| 54 public: | 54 public: |
| 55 virtual WebUIController* CreateWebUIControllerForURL( | 55 virtual WebUIController* CreateWebUIControllerForURL( |
| 56 content::WebUI* web_ui, const GURL& url) const OVERRIDE { | 56 content::WebUI* web_ui, const GURL& url) const OVERRIDE { |
| 57 if (!content::GetContentClient()->HasWebUIScheme(url)) | 57 if (!content::GetContentClient()->HasWebUIScheme(url)) |
| 58 return NULL; | 58 return NULL; |
| (...skipping 1880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1939 // It should have a transient entry. | 1939 // It should have a transient entry. |
| 1940 EXPECT_TRUE(other_controller.GetTransientEntry()); | 1940 EXPECT_TRUE(other_controller.GetTransientEntry()); |
| 1941 | 1941 |
| 1942 // And the interstitial should be showing. | 1942 // And the interstitial should be showing. |
| 1943 EXPECT_TRUE(other_contents->ShowingInterstitialPage()); | 1943 EXPECT_TRUE(other_contents->ShowingInterstitialPage()); |
| 1944 | 1944 |
| 1945 // And the interstitial should do a reload on don't proceed. | 1945 // And the interstitial should do a reload on don't proceed. |
| 1946 EXPECT_TRUE(static_cast<InterstitialPageImpl*>( | 1946 EXPECT_TRUE(static_cast<InterstitialPageImpl*>( |
| 1947 other_contents->GetInterstitialPage())->reload_on_dont_proceed()); | 1947 other_contents->GetInterstitialPage())->reload_on_dont_proceed()); |
| 1948 } | 1948 } |
| OLD | NEW |