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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 88 } |
89 | 89 |
90 private: | 90 private: |
91 WebContentsImplTestWebUIControllerFactory factory_; | 91 WebContentsImplTestWebUIControllerFactory factory_; |
92 }; | 92 }; |
93 | 93 |
94 class TestInterstitialPage; | 94 class TestInterstitialPage; |
95 | 95 |
96 class TestInterstitialPageDelegate : public InterstitialPageDelegate { | 96 class TestInterstitialPageDelegate : public InterstitialPageDelegate { |
97 public: | 97 public: |
98 TestInterstitialPageDelegate(TestInterstitialPage* interstitial_page) | 98 explicit TestInterstitialPageDelegate(TestInterstitialPage* interstitial_page) |
99 : interstitial_page_(interstitial_page) {} | 99 : interstitial_page_(interstitial_page) {} |
100 virtual void CommandReceived(const std::string& command) OVERRIDE; | 100 virtual void CommandReceived(const std::string& command) OVERRIDE; |
101 virtual std::string GetHTMLContents() OVERRIDE { return std::string(); } | 101 virtual std::string GetHTMLContents() OVERRIDE { return std::string(); } |
102 virtual void OnDontProceed() OVERRIDE; | 102 virtual void OnDontProceed() OVERRIDE; |
103 virtual void OnProceed() OVERRIDE; | 103 virtual void OnProceed() OVERRIDE; |
104 private: | 104 private: |
105 TestInterstitialPage* interstitial_page_; | 105 TestInterstitialPage* interstitial_page_; |
106 }; | 106 }; |
107 | 107 |
108 class TestInterstitialPage : public InterstitialPageImpl { | 108 class TestInterstitialPage : public InterstitialPageImpl { |
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1943 | 1943 |
1944 // And the interstitial should be showing. | 1944 // And the interstitial should be showing. |
1945 EXPECT_TRUE(other_contents->ShowingInterstitialPage()); | 1945 EXPECT_TRUE(other_contents->ShowingInterstitialPage()); |
1946 | 1946 |
1947 // And the interstitial should do a reload on don't proceed. | 1947 // And the interstitial should do a reload on don't proceed. |
1948 EXPECT_TRUE(static_cast<InterstitialPageImpl*>( | 1948 EXPECT_TRUE(static_cast<InterstitialPageImpl*>( |
1949 other_contents->GetInterstitialPage())->reload_on_dont_proceed()); | 1949 other_contents->GetInterstitialPage())->reload_on_dont_proceed()); |
1950 } | 1950 } |
1951 | 1951 |
1952 } // namespace content | 1952 } // namespace content |
OLD | NEW |