Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1752)

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc

Issue 2503203002: Revert "Getting rid of DelegatedFrameData" (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 private: 143 private:
144 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrameTest); 144 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrameTest);
145 }; 145 };
146 146
147 cc::CompositorFrame CreateDelegatedFrame(float scale_factor, 147 cc::CompositorFrame CreateDelegatedFrame(float scale_factor,
148 gfx::Size size, 148 gfx::Size size,
149 const gfx::Rect& damage) { 149 const gfx::Rect& damage) {
150 cc::CompositorFrame frame; 150 cc::CompositorFrame frame;
151 frame.metadata.device_scale_factor = scale_factor; 151 frame.metadata.device_scale_factor = scale_factor;
152 frame.delegated_frame_data.reset(new cc::DelegatedFrameData);
152 153
153 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); 154 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
154 pass->SetNew(cc::RenderPassId(1, 1), gfx::Rect(size), damage, 155 pass->SetNew(cc::RenderPassId(1, 1), gfx::Rect(size), damage,
155 gfx::Transform()); 156 gfx::Transform());
156 frame.render_pass_list.push_back(std::move(pass)); 157 frame.delegated_frame_data->render_pass_list.push_back(std::move(pass));
157 return frame; 158 return frame;
158 } 159 }
159 160
160 TEST_F(RenderWidgetHostViewChildFrameTest, VisibilityTest) { 161 TEST_F(RenderWidgetHostViewChildFrameTest, VisibilityTest) {
161 view_->Show(); 162 view_->Show();
162 ASSERT_TRUE(view_->IsShowing()); 163 ASSERT_TRUE(view_->IsShowing());
163 164
164 view_->Hide(); 165 view_->Hide();
165 ASSERT_FALSE(view_->IsShowing()); 166 ASSERT_FALSE(view_->IsShowing());
166 } 167 }
(...skipping 24 matching lines...) Expand all
191 192
192 // Surface ID should have been passed to CrossProcessFrameConnector to 193 // Surface ID should have been passed to CrossProcessFrameConnector to
193 // be sent to the embedding renderer. 194 // be sent to the embedding renderer.
194 EXPECT_EQ(id, test_frame_connector_->last_surface_id_received_); 195 EXPECT_EQ(id, test_frame_connector_->last_surface_id_received_);
195 EXPECT_EQ(view_size, test_frame_connector_->last_frame_size_received_); 196 EXPECT_EQ(view_size, test_frame_connector_->last_frame_size_received_);
196 EXPECT_EQ(scale_factor, test_frame_connector_->last_scale_factor_received_); 197 EXPECT_EQ(scale_factor, test_frame_connector_->last_scale_factor_received_);
197 } 198 }
198 } 199 }
199 200
200 } // namespace content 201 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698