| 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 "content/test/test_web_contents.h" | 5 #include "content/test/test_web_contents.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "content/browser/browser_url_handler_impl.h" | 10 #include "content/browser/browser_url_handler_impl.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 : WebContentsImpl(browser_context, NULL), | 31 : WebContentsImpl(browser_context, NULL), |
| 32 delegate_view_override_(NULL), | 32 delegate_view_override_(NULL), |
| 33 expect_set_history_offset_and_length_(false), | 33 expect_set_history_offset_and_length_(false), |
| 34 expect_set_history_offset_and_length_history_length_(0) { | 34 expect_set_history_offset_and_length_history_length_(0) { |
| 35 } | 35 } |
| 36 | 36 |
| 37 TestWebContents* TestWebContents::Create(BrowserContext* browser_context, | 37 TestWebContents* TestWebContents::Create(BrowserContext* browser_context, |
| 38 SiteInstance* instance) { | 38 SiteInstance* instance) { |
| 39 TestWebContents* test_web_contents = new TestWebContents(browser_context); | 39 TestWebContents* test_web_contents = new TestWebContents(browser_context); |
| 40 test_web_contents->Init(WebContents::CreateParams(browser_context, instance)); | 40 test_web_contents->Init(WebContents::CreateParams(browser_context, instance)); |
| 41 test_web_contents->RenderFrameCreated(test_web_contents->GetMainFrame()); |
| 41 return test_web_contents; | 42 return test_web_contents; |
| 42 } | 43 } |
| 43 | 44 |
| 44 TestWebContents::~TestWebContents() { | 45 TestWebContents::~TestWebContents() { |
| 45 EXPECT_FALSE(expect_set_history_offset_and_length_); | 46 EXPECT_FALSE(expect_set_history_offset_and_length_); |
| 46 } | 47 } |
| 47 | 48 |
| 48 TestRenderFrameHost* TestWebContents::GetMainFrame() { | 49 TestRenderFrameHost* TestWebContents::GetMainFrame() { |
| 49 return static_cast<TestRenderFrameHost*>(WebContentsImpl::GetMainFrame()); | 50 return static_cast<TestRenderFrameHost*>(WebContentsImpl::GetMainFrame()); |
| 50 } | 51 } |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 } | 262 } |
| 262 | 263 |
| 263 void TestWebContents::ShowCreatedWidget(int route_id, | 264 void TestWebContents::ShowCreatedWidget(int route_id, |
| 264 const gfx::Rect& initial_rect) { | 265 const gfx::Rect& initial_rect) { |
| 265 } | 266 } |
| 266 | 267 |
| 267 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { | 268 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { |
| 268 } | 269 } |
| 269 | 270 |
| 270 } // namespace content | 271 } // namespace content |
| OLD | NEW |