OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "mojo/common/common_custom_types.mojom.h" | 10 #include "mojo/common/common_custom_types.mojom.h" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 TestString16Ptr ptr; | 291 TestString16Ptr ptr; |
292 TestString16Impl impl(GetProxy(&ptr)); | 292 TestString16Impl impl(GetProxy(&ptr)); |
293 | 293 |
294 base::string16 str16 = base::ASCIIToUTF16("hello world"); | 294 base::string16 str16 = base::ASCIIToUTF16("hello world"); |
295 | 295 |
296 ptr->BounceString16(str16, ExpectResponse(&str16, run_loop.QuitClosure())); | 296 ptr->BounceString16(str16, ExpectResponse(&str16, run_loop.QuitClosure())); |
297 | 297 |
298 run_loop.Run(); | 298 run_loop.Run(); |
299 } | 299 } |
300 | 300 |
| 301 TEST_F(CommonCustomTypesTest, EmptyString16) { |
| 302 base::RunLoop run_loop; |
| 303 |
| 304 TestString16Ptr ptr; |
| 305 TestString16Impl impl(GetProxy(&ptr)); |
| 306 |
| 307 base::string16 str16; |
| 308 |
| 309 ptr->BounceString16(str16, ExpectResponse(&str16, run_loop.QuitClosure())); |
| 310 |
| 311 run_loop.Run(); |
| 312 } |
| 313 |
301 } // namespace test | 314 } // namespace test |
302 } // namespace common | 315 } // namespace common |
303 } // namespace mojo | 316 } // namespace mojo |
OLD | NEW |