| Index: chrome/common/gpu_messages_unittest.cc
|
| ===================================================================
|
| --- chrome/common/gpu_messages_unittest.cc (revision 68066)
|
| +++ chrome/common/gpu_messages_unittest.cc (working copy)
|
| @@ -9,6 +9,29 @@
|
| #include "ipc/ipc_message_utils.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| +// Test GpuFeatureFlags serialization
|
| +TEST(GPUIPCMessageTest, GpuFeatureFlags) {
|
| + GpuFeatureFlags input;
|
| + input.SetFlags(false, true, false);
|
| +
|
| + IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
|
| + IPC::WriteParam(&msg, input);
|
| +
|
| + GpuFeatureFlags output;
|
| + void* iter = NULL;
|
| + EXPECT_TRUE(IPC::ReadParam(&msg, &iter, &output));
|
| + EXPECT_EQ(input.is_accelerated_2d_canvas_blacklisted(),
|
| + output.is_accelerated_2d_canvas_blacklisted());
|
| + EXPECT_EQ(input.is_accelerated_compositing_blacklisted(),
|
| + output.is_accelerated_compositing_blacklisted());
|
| + EXPECT_EQ(input.is_webgl_blacklisted(),
|
| + output.is_webgl_blacklisted());
|
| +
|
| + std::string log_message;
|
| + IPC::LogParam(output, &log_message);
|
| + EXPECT_STREQ("<GpuFeatureFlags> 0 1 0", log_message.c_str());
|
| +}
|
| +
|
| // Test GPUInfo serialization
|
| TEST(GPUIPCMessageTest, GPUInfo) {
|
| GPUInfo input;
|
|
|