diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-07 18:09:55 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-07 18:09:55 +0000 |
commit | b9ab10cd0c07c9c4bc5c9f09742c3ee8e03ab7a3 (patch) | |
tree | cfa98ae941be636ec692f3ac15ebf82aa0885d99 /chrome/common/common_param_traits_unittest.cc | |
parent | f290f3e46ee27cf48b9b6dbc0f35c0d8af6d0c00 (diff) | |
download | chromium_src-b9ab10cd0c07c9c4bc5c9f09742c3ee8e03ab7a3.zip chromium_src-b9ab10cd0c07c9c4bc5c9f09742c3ee8e03ab7a3.tar.gz chromium_src-b9ab10cd0c07c9c4bc5c9f09742c3ee8e03ab7a3.tar.bz2 |
Add CSS Keyword values and conversion routines to webkit glue.
Review URL: http://codereview.chromium.org/149044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22737 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/common_param_traits_unittest.cc')
-rw-r--r-- | chrome/common/common_param_traits_unittest.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/common/common_param_traits_unittest.cc b/chrome/common/common_param_traits_unittest.cc index f3a7e92..f5db121 100644 --- a/chrome/common/common_param_traits_unittest.cc +++ b/chrome/common/common_param_traits_unittest.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include <string.h> +#include <utility> #include "base/scoped_ptr.h" #include "base/values.h" @@ -52,6 +53,22 @@ TEST(IPCMessageTest, Serialize) { EXPECT_FALSE(IPC::ParamTraits<GURL>::Read(&msg, &iter, &output)); } +// Tests std::pair serialization +TEST(IPCMessageTest, Pair) { + typedef std::pair<std::string, std::string> TestPair; + + TestPair input("foo", "bar"); + IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); + IPC::ParamTraits<TestPair>::Write(&msg, input); + + TestPair output; + void* iter = NULL; + EXPECT_TRUE(IPC::ParamTraits<TestPair>::Read(&msg, &iter, &output)); + EXPECT_EQ(output.first, "foo"); + EXPECT_EQ(output.second, "bar"); + +} + // Tests bitmap serialization. TEST(IPCMessageTest, Bitmap) { SkBitmap bitmap; |