Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: mojo/common/common_custom_types_unittest.cc

Issue 2379993003: Mojo C++ bindings: make String16 and gfx::Size available in Blink (Closed)
Patch Set: mapping back to WebSize :( Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « mojo/common/common_custom_types_struct_traits.cc ('k') | mojo/common/test_common_custom_types.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698