diff options
Diffstat (limited to 'chrome/common/common_param_traits_unittest.cc')
-rw-r--r-- | chrome/common/common_param_traits_unittest.cc | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/chrome/common/common_param_traits_unittest.cc b/chrome/common/common_param_traits_unittest.cc index d888084..f5db121 100644 --- a/chrome/common/common_param_traits_unittest.cc +++ b/chrome/common/common_param_traits_unittest.cc @@ -166,42 +166,3 @@ TEST(IPCMessageTest, DictionaryValue) { iter = NULL; EXPECT_FALSE(IPC::ReadParam(&bad_msg, &iter, &output)); } - -TEST(IPCMessageTest, Geoposition) { - Geoposition input; - input.latitude = 0.1; - input.longitude = 51.3; - input.accuracy = 13.7; - input.altitude = 42.24; - input.altitude_accuracy = 9.3; - input.speed = 55; - input.heading = 120; - input.timestamp = 1977; - input.error_code = Geoposition::ERROR_CODE_POSITION_UNAVAILABLE; - input.error_message = L"unittest error message for geoposition"; - - IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); - IPC::WriteParam(&msg, input); - - Geoposition output; - void* iter = NULL; - EXPECT_TRUE(IPC::ReadParam(&msg, &iter, &output)); - EXPECT_EQ(input.altitude, output.altitude); - EXPECT_EQ(input.altitude_accuracy, output.altitude_accuracy); - EXPECT_EQ(input.latitude, output.latitude); - EXPECT_EQ(input.longitude, output.longitude); - EXPECT_EQ(input.accuracy, output.accuracy); - EXPECT_EQ(input.heading, output.heading); - EXPECT_EQ(input.speed, output.speed); - EXPECT_EQ(input.error_code, output.error_code); - EXPECT_EQ(input.error_message, output.error_message); - - std::wstring log_message; - IPC::LogParam(output, &log_message); - EXPECT_STREQ(L"<Geoposition>" - L"0.100000 51.300000 13.700000 42.240000 " - L"9.300000 55.000000 120.000000 " - L"1977 unittest error message for geoposition" - L"<Geoposition::ErrorCode>2", - log_message.c_str()); -} |