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

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

Issue 2710073003: DelegatedFrameHost should not return old resources to renderer (Closed)
Patch Set: Updated comment Created 3 years, 10 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
« no previous file with comments | « content/browser/renderer_host/delegated_frame_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index 36665017959942e1c54fafe5935f6c485cf07446..6a339a82670f27b7b8480eca9f0a28c2d6a0cf1c 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -1823,8 +1823,8 @@ TEST_F(RenderWidgetHostViewAuraTest, ReturnedResources) {
}
}
-// This test verifies that when the compositor_frame_sink_id changes, then
-// DelegateFrameHost returns compositor resources without a swap ack.
+// This test verifies that when the compositor_frame_sink_id changes, the old
+// resources are not returned.
TEST_F(RenderWidgetHostViewAuraTest, TwoOutputSurfaces) {
FakeSurfaceObserver manager_observer;
ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
@@ -1855,20 +1855,11 @@ TEST_F(RenderWidgetHostViewAuraTest, TwoOutputSurfaces) {
EXPECT_EQ(0u, sink_->message_count());
// Swap another CompositorFrame but this time from another
- // compositor_frame_sink_id.
- // This should trigger a non-ACK ReclaimCompositorResources IPC.
+ // compositor_frame_sink_id. The resources held by DelegatedFrameHost are old
+ // and should not be returned.
view_->OnSwapCompositorFrame(1,
MakeDelegatedFrame(1.f, view_size, view_rect));
- EXPECT_EQ(1u, sink_->message_count());
- {
- const IPC::Message* msg = sink_->GetMessageAt(0);
- EXPECT_EQ(ViewMsg_ReclaimCompositorResources::ID, msg->type());
- ViewMsg_ReclaimCompositorResources::Param params;
- ViewMsg_ReclaimCompositorResources::Read(msg, &params);
- EXPECT_EQ(0u, std::get<0>(params)); // compositor_frame_sink_id
- EXPECT_FALSE(std::get<1>(params)); // is_swap_ack
- }
- sink_->ClearMessages();
+ EXPECT_EQ(0u, sink_->message_count());
// Report that the surface is drawn to trigger an ACK.
cc::Surface* surface = manager->GetSurfaceForId(view_->surface_id());
« no previous file with comments | « content/browser/renderer_host/delegated_frame_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698