| Index: content/common/common_param_traits_unittest.cc
|
| diff --git a/content/common/common_param_traits_unittest.cc b/content/common/common_param_traits_unittest.cc
|
| index 8e5c3232a69bd6454dbe847fd5dbab79b8be8938..7f1cefd9a46124b18fa9c35b651ede17d82ed70f 100644
|
| --- a/content/common/common_param_traits_unittest.cc
|
| +++ b/content/common/common_param_traits_unittest.cc
|
| @@ -255,3 +255,38 @@ TEST(IPCMessageTest, SSLInfo) {
|
| ASSERT_EQ(in.ct_cert_policy_compliance, out.ct_cert_policy_compliance);
|
| ASSERT_EQ(in.ocsp_result, out.ocsp_result);
|
| }
|
| +
|
| +TEST(IPCMessageTest, RenderWidgetSurfaceProperties) {
|
| + content::RenderWidgetSurfaceProperties input;
|
| + input.frame_size = gfx::Size(23, 45);
|
| + input.device_scale_factor = 0.8;
|
| +#ifdef OS_ANDROID
|
| + input.top_controls_height = 16.5;
|
| + input.top_controls_shown_ratio = 0.4;
|
| + input.bottom_controls_height = 23.4;
|
| + input.bottom_controls_shown_ratio = 0.8;
|
| + input.selection = selection;
|
| + input.has_transparent_background = true;
|
| +#endif
|
| +
|
| + IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
|
| + IPC::ParamTraits<content::RenderWidgetSurfaceProperties>::Write(&msg, input);
|
| +
|
| + content::RenderWidgetSurfaceProperties output;
|
| + base::PickleIterator iter(msg);
|
| + EXPECT_TRUE(IPC::ParamTraits<content::RenderWidgetSurfaceProperties>::Read(
|
| + &msg, &iter, &output));
|
| +
|
| + EXPECT_EQ(input.frame_size, output.frame_size);
|
| + EXPECT_EQ(input.device_scale_factor, output.device_scale_factor);
|
| +#ifdef OS_ANDROID
|
| + EXPECT_EQ(input.top_controls_height, output.top_controls_height);
|
| + EXPECT_EQ(input.top_controls_shown_ratio, output.top_controls_shown_ratio);
|
| + EXPECT_EQ(input.bottom_controls_height, output.bottom_controls_height);
|
| + EXPECT_EQ(input.bottom_controls_shown_ratio,
|
| + output.bottom_controls_shown_ratio);
|
| + EXPECT_EQ(input.selection, output.selection);
|
| + EXPECT_EQ(input.has_transparent_background,
|
| + output.has_transparent_background);
|
| +#endif
|
| +}
|
|
|