OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/mock_content_browser_client.h" | 7 #include "content/browser/mock_content_browser_client.h" |
8 #include "content/browser/renderer_host/render_view_host.h" | 8 #include "content/browser/renderer_host/render_view_host.h" |
9 #include "content/browser/renderer_host/render_widget_host_view.h" | 9 #include "content/browser/renderer_host/render_widget_host_view.h" |
10 #include "content/browser/renderer_host/test_render_view_host.h" | 10 #include "content/browser/renderer_host/test_render_view_host.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "content/public/common/bindings_policy.h" | 21 #include "content/public/common/bindings_policy.h" |
22 #include "content/public/common/content_constants.h" | 22 #include "content/public/common/content_constants.h" |
23 #include "content/public/common/url_constants.h" | 23 #include "content/public/common/url_constants.h" |
24 #include "content/test/test_browser_thread.h" | 24 #include "content/test/test_browser_thread.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
26 #include "webkit/glue/webkit_glue.h" | 26 #include "webkit/glue/webkit_glue.h" |
27 | 27 |
28 using content::BrowserThread; | 28 using content::BrowserThread; |
29 using content::NavigationEntry; | 29 using content::NavigationEntry; |
30 using content::NavigationEntryImpl; | 30 using content::NavigationEntryImpl; |
| 31 using content::WebContents; |
31 using webkit::forms::PasswordForm; | 32 using webkit::forms::PasswordForm; |
32 | 33 |
33 namespace { | 34 namespace { |
34 | 35 |
35 class TabContentsTestWebUIFactory : public content::EmptyWebUIFactory { | 36 class TabContentsTestWebUIFactory : public content::EmptyWebUIFactory { |
36 public: | 37 public: |
37 virtual WebUI* CreateWebUIForURL(TabContents* source, | 38 virtual WebUI* CreateWebUIForURL(WebContents* source, |
38 const GURL& url) const OVERRIDE { | 39 const GURL& url) const OVERRIDE { |
39 if (!HasWebUIScheme(url)) | 40 if (!HasWebUIScheme(url)) |
40 return NULL; | 41 return NULL; |
41 | 42 |
42 return new WebUI(source); | 43 return new WebUI(source); |
43 } | 44 } |
44 | 45 |
45 virtual bool UseWebUIForURL(content::BrowserContext* browser_context, | 46 virtual bool UseWebUIForURL(content::BrowserContext* browser_context, |
46 const GURL& url) const OVERRIDE { | 47 const GURL& url) const OVERRIDE { |
47 return HasWebUIScheme(url); | 48 return HasWebUIScheme(url); |
(...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1821 | 1822 |
1822 // It should have a transient entry. | 1823 // It should have a transient entry. |
1823 EXPECT_TRUE(other_controller.GetTransientEntry()); | 1824 EXPECT_TRUE(other_controller.GetTransientEntry()); |
1824 | 1825 |
1825 // And the interstitial should be showing. | 1826 // And the interstitial should be showing. |
1826 EXPECT_TRUE(other_contents->ShowingInterstitialPage()); | 1827 EXPECT_TRUE(other_contents->ShowingInterstitialPage()); |
1827 | 1828 |
1828 // And the interstitial should do a reload on don't proceed. | 1829 // And the interstitial should do a reload on don't proceed. |
1829 EXPECT_TRUE(other_contents->GetInterstitialPage()->reload_on_dont_proceed()); | 1830 EXPECT_TRUE(other_contents->GetInterstitialPage()->reload_on_dont_proceed()); |
1830 } | 1831 } |
OLD | NEW |