| 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/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 7 #include "content/browser/frame_host/interstitial_page_impl.h" | 7 #include "content/browser/frame_host/interstitial_page_impl.h" |
| 8 #include "content/browser/frame_host/navigation_entry_impl.h" | 8 #include "content/browser/frame_host/navigation_entry_impl.h" |
| 9 #include "content/browser/renderer_host/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 10 #include "content/browser/renderer_host/test_render_view_host.h" | 10 #include "content/browser/renderer_host/test_render_view_host.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 } | 176 } |
| 177 | 177 |
| 178 void set_delegate(Delegate* delegate) { | 178 void set_delegate(Delegate* delegate) { |
| 179 delegate_ = delegate; | 179 delegate_ = delegate; |
| 180 } | 180 } |
| 181 | 181 |
| 182 protected: | 182 protected: |
| 183 virtual RenderViewHost* CreateRenderViewHost() OVERRIDE { | 183 virtual RenderViewHost* CreateRenderViewHost() OVERRIDE { |
| 184 return new TestRenderViewHost( | 184 return new TestRenderViewHost( |
| 185 SiteInstance::Create(web_contents()->GetBrowserContext()), | 185 SiteInstance::Create(web_contents()->GetBrowserContext()), |
| 186 this, this, MSG_ROUTING_NONE, MSG_ROUTING_NONE, false); | 186 this, this, this, MSG_ROUTING_NONE, MSG_ROUTING_NONE, false); |
| 187 } | 187 } |
| 188 | 188 |
| 189 virtual WebContentsView* CreateWebContentsView() OVERRIDE { | 189 virtual WebContentsView* CreateWebContentsView() OVERRIDE { |
| 190 return NULL; | 190 return NULL; |
| 191 } | 191 } |
| 192 | 192 |
| 193 private: | 193 private: |
| 194 InterstitialState* state_; | 194 InterstitialState* state_; |
| 195 bool* deleted_; | 195 bool* deleted_; |
| 196 int command_received_count_; | 196 int command_received_count_; |
| (...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2161 TEST_F(WebContentsImplTest, PendingContents) { | 2161 TEST_F(WebContentsImplTest, PendingContents) { |
| 2162 scoped_ptr<TestWebContents> other_contents( | 2162 scoped_ptr<TestWebContents> other_contents( |
| 2163 static_cast<TestWebContents*>(CreateTestWebContents())); | 2163 static_cast<TestWebContents*>(CreateTestWebContents())); |
| 2164 contents()->AddPendingContents(other_contents.get()); | 2164 contents()->AddPendingContents(other_contents.get()); |
| 2165 int route_id = other_contents->GetRenderViewHost()->GetRoutingID(); | 2165 int route_id = other_contents->GetRenderViewHost()->GetRoutingID(); |
| 2166 other_contents.reset(); | 2166 other_contents.reset(); |
| 2167 EXPECT_EQ(NULL, contents()->GetCreatedWindow(route_id)); | 2167 EXPECT_EQ(NULL, contents()->GetCreatedWindow(route_id)); |
| 2168 } | 2168 } |
| 2169 | 2169 |
| 2170 } // namespace content | 2170 } // namespace content |
| OLD | NEW |