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

Unified Diff: mojo/converters/surfaces/tests/surface_unittest.cc

Issue 1968363002: SurfaceAggregator should check whether output is secure when drawin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « mojo/converters/surfaces/surfaces_type_converters.cc ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/converters/surfaces/tests/surface_unittest.cc
diff --git a/mojo/converters/surfaces/tests/surface_unittest.cc b/mojo/converters/surfaces/tests/surface_unittest.cc
index f9f1b981c926d2e41a0bc97b5e27f26543c85f65..4e961229bf6644d7205765bc9d97e937b0546765 100644
--- a/mojo/converters/surfaces/tests/surface_unittest.cc
+++ b/mojo/converters/surfaces/tests/surface_unittest.cc
@@ -154,10 +154,12 @@ TEST_F(SurfaceLibQuadTest, TextureQuad) {
float vertex_opacity[4] = {0.1f, 0.5f, 0.4f, 0.8f};
bool y_flipped = false;
bool nearest_neighbor = false;
+ bool secure_output_only = true;
texture_quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending,
resource_id, gfx::Size(), premultiplied_alpha,
uv_top_left, uv_bottom_right, background_color,
- vertex_opacity, y_flipped, nearest_neighbor);
+ vertex_opacity, y_flipped, nearest_neighbor,
+ secure_output_only);
QuadPtr mus_quad = Quad::From<cc::DrawQuad>(*texture_quad);
ASSERT_FALSE(mus_quad.is_null());
@@ -175,6 +177,7 @@ TEST_F(SurfaceLibQuadTest, TextureQuad) {
EXPECT_EQ(vertex_opacity[i], mus_texture_state->vertex_opacity[i]) << i;
}
EXPECT_EQ(y_flipped, mus_texture_state->y_flipped);
+ EXPECT_EQ(secure_output_only, mus_texture_state->secure_output_only);
}
TEST_F(SurfaceLibQuadTest, TextureQuadEmptyVertexOpacity) {
@@ -306,10 +309,12 @@ TEST(SurfaceLibTest, RenderPass) {
float vertex_opacity[4] = {0.1f, 0.5f, 0.4f, 0.8f};
bool y_flipped = false;
bool nearest_neighbor = false;
+ bool secure_output_only = false;
texture_quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending,
resource_id, gfx::Size(), premultiplied_alpha,
uv_top_left, uv_bottom_right, background_color,
- vertex_opacity, y_flipped, nearest_neighbor);
+ vertex_opacity, y_flipped, nearest_neighbor,
+ secure_output_only);
PassPtr mus_pass = Pass::From(*pass);
ASSERT_FALSE(mus_pass.is_null());
@@ -382,6 +387,7 @@ TEST(SurfaceLibTest, RenderPass) {
<< i;
}
EXPECT_EQ(y_flipped, round_trip_texture_quad->y_flipped);
+ EXPECT_EQ(secure_output_only, round_trip_texture_quad->secure_output_only);
}
TEST(SurfaceLibTest, TransferableResource) {
« no previous file with comments | « mojo/converters/surfaces/surfaces_type_converters.cc ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698