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

Side by Side Diff: mojo/apps/js/test/js_to_cpp_unittest.cc

Issue 289063015: Mojo: Remove SetClient from generated interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « content/child/mojo/mojo_application.cc ('k') | mojo/aura/window_tree_host_mojo.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/file_util.h" 5 #include "base/file_util.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "gin/public/isolate_holder.h" 10 #include "gin/public/isolate_holder.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 class JsToCppTest : public testing::Test { 360 class JsToCppTest : public testing::Test {
361 public: 361 public:
362 JsToCppTest() {} 362 JsToCppTest() {}
363 363
364 void RunTest(const std::string& test, CppSideConnection* cpp_side) { 364 void RunTest(const std::string& test, CppSideConnection* cpp_side) {
365 cpp_side->set_run_loop(&run_loop_); 365 cpp_side->set_run_loop(&run_loop_);
366 366
367 MessagePipe pipe; 367 MessagePipe pipe;
368 js_to_cpp::JsSidePtr js_side = 368 js_to_cpp::JsSidePtr js_side =
369 MakeProxy<js_to_cpp::JsSide>(pipe.handle0.Pass()); 369 MakeProxy<js_to_cpp::JsSide>(pipe.handle0.Pass());
370 js_side->SetClient(cpp_side); 370 js_side.set_client(cpp_side);
371 371
372 js_side.internal_state()->router()-> 372 js_side.internal_state()->router()->
373 set_enforce_errors_from_incoming_receiver(false); 373 set_enforce_errors_from_incoming_receiver(false);
374 374
375 cpp_side->set_js_side(js_side.get()); 375 cpp_side->set_js_side(js_side.get());
376 376
377 gin::IsolateHolder instance(gin::IsolateHolder::kStrictMode); 377 gin::IsolateHolder instance(gin::IsolateHolder::kStrictMode);
378 apps::MojoRunnerDelegate delegate; 378 apps::MojoRunnerDelegate delegate;
379 gin::ShellRunner runner(&delegate, instance.isolate()); 379 gin::ShellRunner runner(&delegate, instance.isolate());
380 delegate.Start(&runner, pipe.handle1.release().value(), test); 380 delegate.Start(&runner, pipe.handle1.release().value(), test);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 if (IsRunningOnIsolatedBot()) 423 if (IsRunningOnIsolatedBot())
424 return; 424 return;
425 425
426 BackPointerCppSideConnection cpp_side_connection; 426 BackPointerCppSideConnection cpp_side_connection;
427 RunTest("mojo/apps/js/test/js_to_cpp_unittest", &cpp_side_connection); 427 RunTest("mojo/apps/js/test/js_to_cpp_unittest", &cpp_side_connection);
428 EXPECT_TRUE(cpp_side_connection.DidSucceed()); 428 EXPECT_TRUE(cpp_side_connection.DidSucceed());
429 } 429 }
430 430
431 } // namespace js 431 } // namespace js
432 } // namespace mojo 432 } // namespace mojo
OLDNEW
« no previous file with comments | « content/child/mojo/mojo_application.cc ('k') | mojo/aura/window_tree_host_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698