Index: content/common/common_param_traits_unittest.cc |
=================================================================== |
--- content/common/common_param_traits_unittest.cc (revision 175576) |
+++ content/common/common_param_traits_unittest.cc (working copy) |
@@ -23,7 +23,6 @@ |
const char* serialize_cases[] = { |
"http://www.google.com/", |
"http://user:pass@host.com:888/foo;bar?baz#nop", |
- "#inva://idurl/", |
}; |
for (size_t i = 0; i < arraysize(serialize_cases); i++) { |
@@ -49,6 +48,15 @@ |
EXPECT_EQ(input.ref(), output.ref()); |
} |
+ // Test an invalid GURL. |
+ { |
+ IPC::Message msg; |
+ msg.WriteString("#inva://idurl/"); |
+ GURL output; |
+ PickleIterator iter(msg); |
+ EXPECT_FALSE(IPC::ParamTraits<GURL>::Read(&msg, &iter, &output)); |
+ } |
+ |
// Also test the corrupt case. |
IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); |
msg.WriteInt(99); |