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

Unified Diff: cc/ipc/struct_traits_unittest.cc

Issue 2707243005: Discard compositor frames from unloaded web content (Closed)
Patch Set: Add default value for source ID in frame metadata 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
« no previous file with comments | « cc/ipc/compositor_frame_metadata_struct_traits.cc ('k') | cc/output/compositor_frame_metadata.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ipc/struct_traits_unittest.cc
diff --git a/cc/ipc/struct_traits_unittest.cc b/cc/ipc/struct_traits_unittest.cc
index 8088ac9d6ad0ef679ec898e560923e4bf9d6c2b6..5647cb51ba8574db34dffc3bba8cb1e25022227c 100644
--- a/cc/ipc/struct_traits_unittest.cc
+++ b/cc/ipc/struct_traits_unittest.cc
@@ -240,6 +240,7 @@ TEST_F(StructTraitsTest, CompositorFrame) {
const gfx::Vector2dF root_scroll_offset(1234.5f, 6789.1f);
const float page_scale_factor = 1337.5f;
const gfx::SizeF scrollable_viewport_size(1337.7f, 1234.5f);
+ const uint32_t content_source_id = 3;
CompositorFrame input;
input.metadata.device_scale_factor = device_scale_factor;
@@ -248,6 +249,7 @@ TEST_F(StructTraitsTest, CompositorFrame) {
input.metadata.scrollable_viewport_size = scrollable_viewport_size;
input.render_pass_list.push_back(std::move(render_pass));
input.resource_list.push_back(resource);
+ input.metadata.content_source_id = content_source_id;
mojom::TraitsTestServicePtr proxy = GetTraitsTestProxy();
CompositorFrame output;
@@ -257,6 +259,7 @@ TEST_F(StructTraitsTest, CompositorFrame) {
EXPECT_EQ(root_scroll_offset, output.metadata.root_scroll_offset);
EXPECT_EQ(page_scale_factor, output.metadata.page_scale_factor);
EXPECT_EQ(scrollable_viewport_size, output.metadata.scrollable_viewport_size);
+ EXPECT_EQ(content_source_id, output.metadata.content_source_id);
ASSERT_EQ(1u, output.resource_list.size());
TransferableResource out_resource = output.resource_list[0];
« no previous file with comments | « cc/ipc/compositor_frame_metadata_struct_traits.cc ('k') | cc/output/compositor_frame_metadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698