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

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

Issue 2761723002: Disable RenderWidgetHostViewChildFrameTest.FrameEvictionKeepsLocalSurfaceId on Win (Closed)
Patch Set: rebase Created 3 years, 9 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); 135 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
136 pass->SetNew(1, gfx::Rect(size), damage, gfx::Transform()); 136 pass->SetNew(1, gfx::Rect(size), damage, gfx::Transform());
137 frame.render_pass_list.push_back(std::move(pass)); 137 frame.render_pass_list.push_back(std::move(pass));
138 return frame; 138 return frame;
139 } 139 }
140 140
141 // http://crbug.com/696919 141 // http://crbug.com/696919
142 #if defined(OS_WIN) 142 #if defined(OS_WIN)
143 #define MAYBE_VisibilityTest DISABLED_VisibilityTest 143 #define MAYBE_VisibilityTest DISABLED_VisibilityTest
144 #define MAYBE_SwapCompositorFrame DISABLED_SwapCompositorFrame 144 #define MAYBE_SwapCompositorFrame DISABLED_SwapCompositorFrame
145 #define MAYBE_FrameEvictionKeepsLocalSurfaceId \
146 DISABLED_FrameEvictionKeepsLocalSurfaceId
145 #else 147 #else
146 #define MAYBE_VisibilityTest VisibilityTest 148 #define MAYBE_VisibilityTest VisibilityTest
147 #define MAYBE_SwapCompositorFrame SwapCompositorFrame 149 #define MAYBE_SwapCompositorFrame SwapCompositorFrame
150 #define MAYBE_FrameEvictionKeepsLocalSurfaceId FrameEvictionKeepsLocalSurfaceId
148 #endif 151 #endif
149 152
150 TEST_F(RenderWidgetHostViewChildFrameTest, MAYBE_VisibilityTest) { 153 TEST_F(RenderWidgetHostViewChildFrameTest, MAYBE_VisibilityTest) {
151 view_->Show(); 154 view_->Show();
152 ASSERT_TRUE(view_->IsShowing()); 155 ASSERT_TRUE(view_->IsShowing());
153 156
154 view_->Hide(); 157 view_->Hide();
155 ASSERT_FALSE(view_->IsShowing()); 158 ASSERT_FALSE(view_->IsShowing());
156 } 159 }
157 160
(...skipping 24 matching lines...) Expand all
182 185
183 // Surface ID should have been passed to CrossProcessFrameConnector to 186 // Surface ID should have been passed to CrossProcessFrameConnector to
184 // be sent to the embedding renderer. 187 // be sent to the embedding renderer.
185 EXPECT_EQ(cc::SurfaceInfo(id, scale_factor, view_size), 188 EXPECT_EQ(cc::SurfaceInfo(id, scale_factor, view_size),
186 test_frame_connector_->last_surface_info_); 189 test_frame_connector_->last_surface_info_);
187 } 190 }
188 } 191 }
189 192
190 // Check that frame eviction does not trigger allocation of a new local surface 193 // Check that frame eviction does not trigger allocation of a new local surface
191 // id. 194 // id.
192 TEST_F(RenderWidgetHostViewChildFrameTest, FrameEvictionKeepsLocalSurfaceId) { 195 TEST_F(RenderWidgetHostViewChildFrameTest,
196 MAYBE_FrameEvictionKeepsLocalSurfaceId) {
193 gfx::Size view_size(100, 100); 197 gfx::Size view_size(100, 100);
194 gfx::Rect view_rect(view_size); 198 gfx::Rect view_rect(view_size);
195 float scale_factor = 1.f; 199 float scale_factor = 1.f;
196 200
197 view_->SetSize(view_size); 201 view_->SetSize(view_size);
198 view_->Show(); 202 view_->Show();
199 203
200 // Submit a frame. Remember the local surface id and check that has_frame() 204 // Submit a frame. Remember the local surface id and check that has_frame()
201 // returns true. 205 // returns true.
202 view_->OnSwapCompositorFrame( 206 view_->OnSwapCompositorFrame(
(...skipping 11 matching lines...) Expand all
214 218
215 // Submit another frame. Since it has the same size and scale as the first 219 // Submit another frame. Since it has the same size and scale as the first
216 // one, the same surface id must be used. has_frame() must return true. 220 // one, the same surface id must be used. has_frame() must return true.
217 view_->OnSwapCompositorFrame( 221 view_->OnSwapCompositorFrame(
218 0, CreateDelegatedFrame(scale_factor, view_size, view_rect)); 222 0, CreateDelegatedFrame(scale_factor, view_size, view_rect));
219 EXPECT_EQ(surface_id, GetSurfaceId()); 223 EXPECT_EQ(surface_id, GetSurfaceId());
220 EXPECT_TRUE(view_->has_frame()); 224 EXPECT_TRUE(view_->has_frame());
221 } 225 }
222 226
223 } // namespace content 227 } // 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