| 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/mock_content_browser_client.h" | 7 #include "content/browser/mock_content_browser_client.h" |
| 8 #include "content/browser/renderer_host/render_view_host_impl.h" | 8 #include "content/browser/renderer_host/render_view_host_impl.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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 command_received_count_++; | 211 command_received_count_++; |
| 212 } | 212 } |
| 213 | 213 |
| 214 void set_delegate(Delegate* delegate) { | 214 void set_delegate(Delegate* delegate) { |
| 215 delegate_ = delegate; | 215 delegate_ = delegate; |
| 216 } | 216 } |
| 217 | 217 |
| 218 protected: | 218 protected: |
| 219 virtual content::RenderViewHost* CreateRenderViewHost() OVERRIDE { | 219 virtual content::RenderViewHost* CreateRenderViewHost() OVERRIDE { |
| 220 return new TestRenderViewHost( | 220 return new TestRenderViewHost( |
| 221 SiteInstance::Create(tab()->GetBrowserContext()), | 221 SiteInstance::Create(web_contents()->GetBrowserContext()), |
| 222 this, MSG_ROUTING_NONE); | 222 this, MSG_ROUTING_NONE); |
| 223 } | 223 } |
| 224 | 224 |
| 225 virtual content::WebContentsView* CreateWebContentsView() OVERRIDE { | 225 virtual content::WebContentsView* CreateWebContentsView() OVERRIDE { |
| 226 return NULL; | 226 return NULL; |
| 227 } | 227 } |
| 228 | 228 |
| 229 private: | 229 private: |
| 230 InterstitialState* state_; | 230 InterstitialState* state_; |
| 231 bool* deleted_; | 231 bool* deleted_; |
| (...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1931 // It should have a transient entry. | 1931 // It should have a transient entry. |
| 1932 EXPECT_TRUE(other_controller.GetTransientEntry()); | 1932 EXPECT_TRUE(other_controller.GetTransientEntry()); |
| 1933 | 1933 |
| 1934 // And the interstitial should be showing. | 1934 // And the interstitial should be showing. |
| 1935 EXPECT_TRUE(other_contents->ShowingInterstitialPage()); | 1935 EXPECT_TRUE(other_contents->ShowingInterstitialPage()); |
| 1936 | 1936 |
| 1937 // And the interstitial should do a reload on don't proceed. | 1937 // And the interstitial should do a reload on don't proceed. |
| 1938 EXPECT_TRUE(static_cast<InterstitialPageImpl*>( | 1938 EXPECT_TRUE(static_cast<InterstitialPageImpl*>( |
| 1939 other_contents->GetInterstitialPage())->reload_on_dont_proceed()); | 1939 other_contents->GetInterstitialPage())->reload_on_dont_proceed()); |
| 1940 } | 1940 } |
| OLD | NEW |