OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ipc/ipc_message.h" | 5 #include "ipc/ipc_message.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 std::string extra_param_; | 159 std::string extra_param_; |
160 bool called_; | 160 bool called_; |
161 }; | 161 }; |
162 | 162 |
163 TEST_F(IPCMessageParameterTest, EmptyDispatcherWithParam) { | 163 TEST_F(IPCMessageParameterTest, EmptyDispatcherWithParam) { |
164 TestMsgClassEmpty message; | 164 TestMsgClassEmpty message; |
165 EXPECT_TRUE(OnMessageReceived(message)); | 165 EXPECT_TRUE(OnMessageReceived(message)); |
166 EXPECT_TRUE(called_); | 166 EXPECT_TRUE(called_); |
167 } | 167 } |
168 | 168 |
169 TEST_F(IPCMessageParameterTest, OneIntegerWithParam) { | 169 #if defined(OS_ANDROID) |
| 170 #define MAYBE_OneIntegerWithParam DISABLED_OneIntegerWithParam |
| 171 #else |
| 172 #define MAYBE_OneIntegerWithParam OneIntegerWithParam |
| 173 #endif |
| 174 TEST_F(IPCMessageParameterTest, MAYBE_OneIntegerWithParam) { |
170 TestMsgClassI message(42); | 175 TestMsgClassI message(42); |
171 EXPECT_TRUE(OnMessageReceived(message)); | 176 EXPECT_TRUE(OnMessageReceived(message)); |
172 EXPECT_TRUE(called_); | 177 EXPECT_TRUE(called_); |
173 } | 178 } |
174 | 179 |
175 /* TODO: handle sync IPCs | 180 /* TODO: handle sync IPCs |
176 TEST_F(IPCMessageParameterTest, Sync) { | 181 TEST_F(IPCMessageParameterTest, Sync) { |
177 std::string output; | 182 std::string output; |
178 TestMsgClassIS message(42, &output); | 183 TestMsgClassIS message(42, &output); |
179 EXPECT_TRUE(OnMessageReceived(message)); | 184 EXPECT_TRUE(OnMessageReceived(message)); |
180 EXPECT_TRUE(called_); | 185 EXPECT_TRUE(called_); |
181 EXPECT_EQ(output, std::string("out")); | 186 EXPECT_EQ(output, std::string("out")); |
182 }*/ | 187 }*/ |
183 | 188 |
184 } // namespace | 189 } // namespace |
OLD | NEW |