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

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

Issue 2785193003: Enable disabled RenderWidgetHostViewChildFrameTest (Closed)
Patch Set: Created 3 years, 8 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 cc::CompositorFrame frame; 149 cc::CompositorFrame frame;
150 frame.metadata.device_scale_factor = scale_factor; 150 frame.metadata.device_scale_factor = scale_factor;
151 frame.metadata.begin_frame_ack = cc::BeginFrameAck(0, 1, 1, true); 151 frame.metadata.begin_frame_ack = cc::BeginFrameAck(0, 1, 1, true);
152 152
153 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); 153 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
154 pass->SetNew(1, gfx::Rect(size), damage, gfx::Transform()); 154 pass->SetNew(1, gfx::Rect(size), damage, gfx::Transform());
155 frame.render_pass_list.push_back(std::move(pass)); 155 frame.render_pass_list.push_back(std::move(pass));
156 return frame; 156 return frame;
157 } 157 }
158 158
159 // http://crbug.com/696919 159 TEST_F(RenderWidgetHostViewChildFrameTest, VisibilityTest) {
160 #if defined(OS_WIN)
161 #define MAYBE_VisibilityTest DISABLED_VisibilityTest
162 #define MAYBE_SwapCompositorFrame DISABLED_SwapCompositorFrame
163 #define MAYBE_FrameEvictionKeepsLocalSurfaceId \
164 DISABLED_FrameEvictionKeepsLocalSurfaceId
165 #else
166 #define MAYBE_VisibilityTest VisibilityTest
167 #define MAYBE_SwapCompositorFrame SwapCompositorFrame
168 #define MAYBE_FrameEvictionKeepsLocalSurfaceId FrameEvictionKeepsLocalSurfaceId
169 #endif
170
171 TEST_F(RenderWidgetHostViewChildFrameTest, MAYBE_VisibilityTest) {
172 view_->Show(); 160 view_->Show();
173 ASSERT_TRUE(view_->IsShowing()); 161 ASSERT_TRUE(view_->IsShowing());
174 162
175 view_->Hide(); 163 view_->Hide();
176 ASSERT_FALSE(view_->IsShowing()); 164 ASSERT_FALSE(view_->IsShowing());
177 } 165 }
178 166
179 // Verify that SubmitCompositorFrame behavior is correct when a delegated 167 // Verify that SubmitCompositorFrame behavior is correct when a delegated
180 // frame is received from a renderer process. 168 // frame is received from a renderer process.
181 TEST_F(RenderWidgetHostViewChildFrameTest, MAYBE_SwapCompositorFrame) { 169 TEST_F(RenderWidgetHostViewChildFrameTest, SwapCompositorFrame) {
182 gfx::Size view_size(100, 100); 170 gfx::Size view_size(100, 100);
183 gfx::Rect view_rect(view_size); 171 gfx::Rect view_rect(view_size);
184 float scale_factor = 1.f; 172 float scale_factor = 1.f;
185 cc::LocalSurfaceId local_surface_id(1, base::UnguessableToken::Create()); 173 cc::LocalSurfaceId local_surface_id(1, base::UnguessableToken::Create());
186 174
187 view_->SetSize(view_size); 175 view_->SetSize(view_size);
188 view_->Show(); 176 view_->Show();
189 177
190 view_->SubmitCompositorFrame( 178 view_->SubmitCompositorFrame(
191 local_surface_id, 179 local_surface_id,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 // Explicit ack through OnBeginFrameDidNotSwap is forwarded. 269 // Explicit ack through OnBeginFrameDidNotSwap is forwarded.
282 cc::BeginFrameAck ack(source_id, 6, 4, false); 270 cc::BeginFrameAck ack(source_id, 6, 4, false);
283 view_->OnBeginFrameDidNotSwap(ack); 271 view_->OnBeginFrameDidNotSwap(ack);
284 EXPECT_EQ(ack, source.LastAckForObserver(view_->support_.get())); 272 EXPECT_EQ(ack, source.LastAckForObserver(view_->support_.get()));
285 } 273 }
286 274
287 view_->SetNeedsBeginFrames(false); 275 view_->SetNeedsBeginFrames(false);
288 } 276 }
289 277
290 } // namespace content 278 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698