Chromium Code Reviews| Index: chrome/common/common_param_traits_unittest.cc |
| diff --git a/chrome/common/common_param_traits_unittest.cc b/chrome/common/common_param_traits_unittest.cc |
| index 9a95c0f0a7b23f79299cefa20402f9dc67f500bd..9c5c8d24274e8b0c32a589b160c2ad86394243d7 100644 |
| --- a/chrome/common/common_param_traits_unittest.cc |
| +++ b/chrome/common/common_param_traits_unittest.cc |
| @@ -14,7 +14,10 @@ |
| #include "ipc/ipc_message_utils.h" |
| #include "net/base/host_port_pair.h" |
| #include "printing/backend/print_backend.h" |
| +#if defined(OS_WIN) |
|
kmadhusu
2011/03/01 19:42:38
Platform-specific headers needs to follow the cros
dpapad
2011/03/01 22:41:24
Done. I did it also for platform specific includes
|
| +#include "printing/emf_win.h" |
| #include "printing/native_metafile.h" |
| +#endif |
| #include "printing/page_range.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| #include "third_party/skia/include/core/SkBitmap.h" |
| @@ -212,6 +215,8 @@ TEST(IPCMessageTest, Geoposition) { |
| log_message.c_str()); |
| } |
| +namespace printing { |
| + |
| // Tests printing::PageRange serialization |
| TEST(IPCMessageTest, PageRange) { |
| printing::PageRange input; |
| @@ -227,21 +232,21 @@ TEST(IPCMessageTest, PageRange) { |
| EXPECT_TRUE(input == output); |
| } |
| -// Tests printing::NativeMetafile serialization. |
| +// Tests printing::Emf serialization. |
|
vandebo (ex-Chrome)
2011/03/01 19:01:01
This is trying to tests NativeMetafile, not EMF.
dpapad
2011/03/01 22:41:24
Done. I also removed this test from the friend lis
|
| // TODO(sanjeevr): Make this test meaningful for non-Windows platforms. We |
| // need to initialize the metafile using alternate means on the other OSes. |
| #if defined(OS_WIN) |
| TEST(IPCMessageTest, Metafile) { |
| - printing::NativeMetafile metafile; |
| + printing::Emf metafile; |
| RECT test_rect = {0, 0, 100, 100}; |
| - // Create a metsfile using the screen DC as a reference. |
| + // Create a metafile using the screen DC as a reference. |
| metafile.CreateDc(NULL, NULL); |
| metafile.CloseDc(); |
| IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); |
| IPC::ParamTraits<printing::NativeMetafile>::Write(&msg, metafile); |
| - printing::NativeMetafile output; |
| + printing::Emf output; |
| void* iter = NULL; |
| EXPECT_TRUE(IPC::ParamTraits<printing::NativeMetafile>::Read( |
| &msg, &iter, &output)); |
| @@ -259,7 +264,7 @@ TEST(IPCMessageTest, Metafile) { |
| memset(bogus_data.get(), 'B', bogus_data_size); |
| bad_msg.WriteData(bogus_data.get(), bogus_data_size); |
| // Make sure we don't read out the metafile! |
| - printing::NativeMetafile bad_output; |
| + printing::Emf bad_output; |
| iter = NULL; |
| EXPECT_FALSE(IPC::ParamTraits<printing::NativeMetafile>::Read( |
| &bad_msg, &iter, &bad_output)); |
| @@ -287,6 +292,8 @@ TEST(IPCMessageTest, PrinterCapsAndDefaults) { |
| EXPECT_TRUE(input.defaults_mime_type == output.defaults_mime_type); |
| } |
| +} // namespace printing |
| + |
| // Tests net::HostPortPair serialization |
| TEST(IPCMessageTest, HostPortPair) { |
| net::HostPortPair input("host.com", 12345); |