| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/frame_host/render_widget_host_view_child_frame.h" | 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 ContextProviderFactoryImpl::Initialize(&gpu_channel_factory_); | 89 ContextProviderFactoryImpl::Initialize(&gpu_channel_factory_); |
| 90 ui::ContextProviderFactory::SetInstance( | 90 ui::ContextProviderFactory::SetInstance( |
| 91 ContextProviderFactoryImpl::GetInstance()); | 91 ContextProviderFactoryImpl::GetInstance()); |
| 92 #endif | 92 #endif |
| 93 | 93 |
| 94 MockRenderProcessHost* process_host = | 94 MockRenderProcessHost* process_host = |
| 95 new MockRenderProcessHost(browser_context_.get()); | 95 new MockRenderProcessHost(browser_context_.get()); |
| 96 int32_t routing_id = process_host->GetNextRoutingID(); | 96 int32_t routing_id = process_host->GetNextRoutingID(); |
| 97 widget_host_ = | 97 widget_host_ = |
| 98 new RenderWidgetHostImpl(&delegate_, process_host, routing_id, false); | 98 new RenderWidgetHostImpl(&delegate_, process_host, routing_id, false); |
| 99 view_ = new RenderWidgetHostViewChildFrame(widget_host_); | 99 view_ = RenderWidgetHostViewChildFrame::Create(widget_host_); |
| 100 | 100 |
| 101 test_frame_connector_ = new MockCrossProcessFrameConnector(); | 101 test_frame_connector_ = new MockCrossProcessFrameConnector(); |
| 102 view_->SetCrossProcessFrameConnector(test_frame_connector_); | 102 view_->SetCrossProcessFrameConnector(test_frame_connector_); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void TearDown() override { | 105 void TearDown() override { |
| 106 if (view_) | 106 if (view_) |
| 107 view_->Destroy(); | 107 view_->Destroy(); |
| 108 delete widget_host_; | 108 delete widget_host_; |
| 109 delete test_frame_connector_; | 109 delete test_frame_connector_; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 // Surface ID should have been passed to CrossProcessFrameConnector to | 191 // Surface ID should have been passed to CrossProcessFrameConnector to |
| 192 // be sent to the embedding renderer. | 192 // be sent to the embedding renderer. |
| 193 EXPECT_EQ(id, test_frame_connector_->last_surface_id_received_); | 193 EXPECT_EQ(id, test_frame_connector_->last_surface_id_received_); |
| 194 EXPECT_EQ(view_size, test_frame_connector_->last_frame_size_received_); | 194 EXPECT_EQ(view_size, test_frame_connector_->last_frame_size_received_); |
| 195 EXPECT_EQ(scale_factor, test_frame_connector_->last_scale_factor_received_); | 195 EXPECT_EQ(scale_factor, test_frame_connector_->last_scale_factor_received_); |
| 196 } | 196 } |
| 197 } | 197 } |
| 198 | 198 |
| 199 } // namespace content | 199 } // namespace content |
| OLD | NEW |