| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 TestWebContents::TestWebContents(BrowserContext* browser_context) | 30 TestWebContents::TestWebContents(BrowserContext* browser_context) |
| 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 LOG(ERROR) << "TWC[]::Create:"; |
| 40 |
| 39 TestWebContents* test_web_contents = new TestWebContents(browser_context); | 41 TestWebContents* test_web_contents = new TestWebContents(browser_context); |
| 40 test_web_contents->Init(WebContents::CreateParams(browser_context, instance)); | 42 test_web_contents->Init(WebContents::CreateParams(browser_context, instance)); |
| 43 |
| 44 test_web_contents->RenderFrameCreated(test_web_contents->GetMainFrame()); |
| 45 //test_web_contents->NotifyFrameSwapped( |
| 46 // nullptr, test_web_contents->GetMainFrame()); |
| 47 |
| 48 LOG(ERROR) << "TWC[]::Create: complete"; |
| 41 return test_web_contents; | 49 return test_web_contents; |
| 42 } | 50 } |
| 43 | 51 |
| 44 TestWebContents::~TestWebContents() { | 52 TestWebContents::~TestWebContents() { |
| 45 EXPECT_FALSE(expect_set_history_offset_and_length_); | 53 EXPECT_FALSE(expect_set_history_offset_and_length_); |
| 46 } | 54 } |
| 47 | 55 |
| 48 TestRenderFrameHost* TestWebContents::GetMainFrame() { | 56 TestRenderFrameHost* TestWebContents::GetMainFrame() { |
| 49 return static_cast<TestRenderFrameHost*>(WebContentsImpl::GetMainFrame()); | 57 return static_cast<TestRenderFrameHost*>(WebContentsImpl::GetMainFrame()); |
| 50 } | 58 } |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 } | 269 } |
| 262 | 270 |
| 263 void TestWebContents::ShowCreatedWidget(int route_id, | 271 void TestWebContents::ShowCreatedWidget(int route_id, |
| 264 const gfx::Rect& initial_rect) { | 272 const gfx::Rect& initial_rect) { |
| 265 } | 273 } |
| 266 | 274 |
| 267 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { | 275 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { |
| 268 } | 276 } |
| 269 | 277 |
| 270 } // namespace content | 278 } // namespace content |
| OLD | NEW |