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

Unified Diff: chrome/common/common_param_traits_unittest.cc

Issue 5947002: As the first step in an effort to improve robustness of the cloud print proxy... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Review comments Created 10 years 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 | « chrome/common/common_param_traits.cc ('k') | chrome/common/utility_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/common_param_traits_unittest.cc
===================================================================
--- chrome/common/common_param_traits_unittest.cc (revision 69859)
+++ chrome/common/common_param_traits_unittest.cc (working copy)
@@ -13,6 +13,7 @@
#include "googleurl/src/gurl.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_utils.h"
+#include "printing/backend/print_backend.h"
#include "printing/native_metafile.h"
#include "printing/page_range.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -264,3 +265,24 @@
}
#endif // defined(OS_WIN)
+// Tests printing::PrinterCapsAndDefaults serialization
+TEST(IPCMessageTest, PrinterCapsAndDefaults) {
+ printing::PrinterCapsAndDefaults input;
+ input.printer_capabilities = "Test Capabilities";
+ input.caps_mime_type = "text/plain";
+ input.printer_defaults = "Test Defaults";
+ input.defaults_mime_type = "text/plain";
+
+ IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
+ IPC::ParamTraits<printing::PrinterCapsAndDefaults>::Write(&msg, input);
+
+ printing::PrinterCapsAndDefaults output;
+ void* iter = NULL;
+ EXPECT_TRUE(IPC::ParamTraits<printing::PrinterCapsAndDefaults>::Read(
+ &msg, &iter, &output));
+ EXPECT_TRUE(input.printer_capabilities == output.printer_capabilities);
+ EXPECT_TRUE(input.caps_mime_type == output.caps_mime_type);
+ EXPECT_TRUE(input.printer_defaults == output.printer_defaults);
+ EXPECT_TRUE(input.defaults_mime_type == output.defaults_mime_type);
+}
+
« no previous file with comments | « chrome/common/common_param_traits.cc ('k') | chrome/common/utility_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698