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

Unified Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 2728183002: RendererCompositorFrameSink should handle local surface id allocation (Closed)
Patch Set: Added comment 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_unittest.cc
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 068558d7757f56f3a8b5c166bb18fd404d744a4b..fc296e94176b3a2262fda0c1a57058ad178e4e4c 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -1277,9 +1277,10 @@ TEST_F(RenderWidgetHostTest, SwapCompositorFrameWithBadSourceId) {
// First swap a frame with an invalid ID.
cc::CompositorFrame frame;
+ cc::LocalSurfaceId local_surface_id(1, base::UnguessableToken::Create());
frame.metadata.content_source_id = 99;
host_->OnMessageReceived(ViewHostMsg_SwapCompositorFrame(
- 0, 0, frame, std::vector<IPC::Message>()));
+ 0, 0, local_surface_id, frame, std::vector<IPC::Message>()));
EXPECT_FALSE(
static_cast<TestView*>(host_->GetView())->did_swap_compositor_frame());
static_cast<TestView*>(host_->GetView())->reset_did_swap_compositor_frame();
@@ -1287,7 +1288,7 @@ TEST_F(RenderWidgetHostTest, SwapCompositorFrameWithBadSourceId) {
// Test with a valid content ID as a control.
frame.metadata.content_source_id = 100;
host_->OnMessageReceived(ViewHostMsg_SwapCompositorFrame(
- 0, 0, frame, std::vector<IPC::Message>()));
+ 0, 0, local_surface_id, frame, std::vector<IPC::Message>()));
EXPECT_TRUE(
static_cast<TestView*>(host_->GetView())->did_swap_compositor_frame());
static_cast<TestView*>(host_->GetView())->reset_did_swap_compositor_frame();
@@ -1297,7 +1298,7 @@ TEST_F(RenderWidgetHostTest, SwapCompositorFrameWithBadSourceId) {
// the corresponding DidCommitProvisionalLoad (it's a race).
frame.metadata.content_source_id = 101;
host_->OnMessageReceived(ViewHostMsg_SwapCompositorFrame(
- 0, 0, frame, std::vector<IPC::Message>()));
+ 0, 0, local_surface_id, frame, std::vector<IPC::Message>()));
EXPECT_TRUE(
static_cast<TestView*>(host_->GetView())->did_swap_compositor_frame());
}

Powered by Google App Engine
This is Rietveld 408576698