Index: content/common/cc_messages_unittest.cc |
diff --git a/content/common/cc_messages_unittest.cc b/content/common/cc_messages_unittest.cc |
index 69a5f253ca54610e5d3dd69e607ddf0f5fe846eb..426aeb3281dc85a718dd228778cb407e86a64643 100644 |
--- a/content/common/cc_messages_unittest.cc |
+++ b/content/common/cc_messages_unittest.cc |
@@ -26,6 +26,7 @@ using cc::TransferableResource; |
using cc::StreamVideoDrawQuad; |
using cc::VideoLayerImpl; |
using cc::YUVVideoDrawQuad; |
+using cc::YUVAVideoDrawQuad; |
using gfx::Transform; |
using WebKit::WebFilterOperation; |
using WebKit::WebFilterOperations; |
@@ -100,6 +101,10 @@ class CCMessagesTest : public testing::Test { |
Compare(YUVVideoDrawQuad::MaterialCast(a), |
YUVVideoDrawQuad::MaterialCast(b)); |
break; |
+ case DrawQuad::YUVA_VIDEO_CONTENT: |
+ Compare(YUVAVideoDrawQuad::MaterialCast(a), |
+ YUVAVideoDrawQuad::MaterialCast(b)); |
+ break; |
case DrawQuad::INVALID: |
break; |
} |
@@ -176,6 +181,22 @@ class CCMessagesTest : public testing::Test { |
EXPECT_EQ(a->v_plane.format, b->v_plane.format); |
} |
+ void Compare(const YUVAVideoDrawQuad* a, const YUVAVideoDrawQuad* b) { |
+ EXPECT_EQ(a->tex_scale, b->tex_scale); |
+ EXPECT_EQ(a->y_plane.resourceId, b->y_plane.resourceId); |
+ EXPECT_EQ(a->y_plane.size.ToString(), b->y_plane.size.ToString()); |
+ EXPECT_EQ(a->y_plane.format, b->y_plane.format); |
+ EXPECT_EQ(a->u_plane.resourceId, b->u_plane.resourceId); |
+ EXPECT_EQ(a->u_plane.size.ToString(), b->u_plane.size.ToString()); |
+ EXPECT_EQ(a->u_plane.format, b->u_plane.format); |
+ EXPECT_EQ(a->v_plane.resourceId, b->v_plane.resourceId); |
+ EXPECT_EQ(a->v_plane.size.ToString(), b->v_plane.size.ToString()); |
+ EXPECT_EQ(a->v_plane.format, b->v_plane.format); |
+ EXPECT_EQ(a->a_plane.resourceId, b->a_plane.resourceId); |
+ EXPECT_EQ(a->a_plane.size.ToString(), b->a_plane.size.ToString()); |
+ EXPECT_EQ(a->a_plane.format, b->a_plane.format); |
+ } |
+ |
void Compare(const TransferableResource& a, const TransferableResource& b) { |
EXPECT_EQ(a.id, b.id); |
EXPECT_EQ(a.format, b.format); |