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/site_instance_impl.h" | 10 #include "content/browser/site_instance_impl.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 void CommandReceived() { | 175 void CommandReceived() { |
176 command_received_count_++; | 176 command_received_count_++; |
177 } | 177 } |
178 | 178 |
179 void set_delegate(Delegate* delegate) { | 179 void set_delegate(Delegate* delegate) { |
180 delegate_ = delegate; | 180 delegate_ = delegate; |
181 } | 181 } |
182 | 182 |
183 protected: | 183 protected: |
184 virtual RenderViewHost* CreateRenderViewHost() OVERRIDE { | |
185 return new TestRenderViewHost( | |
186 SiteInstance::Create(web_contents()->GetBrowserContext()), | |
187 this, this, this, MSG_ROUTING_NONE, MSG_ROUTING_NONE, false); | |
188 } | |
189 | |
190 virtual WebContentsView* CreateWebContentsView() OVERRIDE { | 184 virtual WebContentsView* CreateWebContentsView() OVERRIDE { |
191 return NULL; | 185 return NULL; |
192 } | 186 } |
193 | 187 |
194 private: | 188 private: |
195 InterstitialState* state_; | 189 InterstitialState* state_; |
196 bool* deleted_; | 190 bool* deleted_; |
197 int command_received_count_; | 191 int command_received_count_; |
198 Delegate* delegate_; | 192 Delegate* delegate_; |
199 }; | 193 }; |
(...skipping 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2162 TEST_F(WebContentsImplTest, PendingContents) { | 2156 TEST_F(WebContentsImplTest, PendingContents) { |
2163 scoped_ptr<TestWebContents> other_contents( | 2157 scoped_ptr<TestWebContents> other_contents( |
2164 static_cast<TestWebContents*>(CreateTestWebContents())); | 2158 static_cast<TestWebContents*>(CreateTestWebContents())); |
2165 contents()->AddPendingContents(other_contents.get()); | 2159 contents()->AddPendingContents(other_contents.get()); |
2166 int route_id = other_contents->GetRenderViewHost()->GetRoutingID(); | 2160 int route_id = other_contents->GetRenderViewHost()->GetRoutingID(); |
2167 other_contents.reset(); | 2161 other_contents.reset(); |
2168 EXPECT_EQ(NULL, contents()->GetCreatedWindow(route_id)); | 2162 EXPECT_EQ(NULL, contents()->GetCreatedWindow(route_id)); |
2169 } | 2163 } |
2170 | 2164 |
2171 } // namespace content | 2165 } // namespace content |
OLD | NEW |