OLD | NEW |
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/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 js_to_cpp::JsSidePtr js_side; | 374 js_to_cpp::JsSidePtr js_side; |
375 auto js_side_proxy = GetProxy(&js_side); | 375 auto js_side_proxy = GetProxy(&js_side); |
376 | 376 |
377 cpp_side->set_js_side(js_side.get()); | 377 cpp_side->set_js_side(js_side.get()); |
378 js_to_cpp::CppSidePtr cpp_side_ptr; | 378 js_to_cpp::CppSidePtr cpp_side_ptr; |
379 cpp_side->Bind(GetProxy(&cpp_side_ptr)); | 379 cpp_side->Bind(GetProxy(&cpp_side_ptr)); |
380 | 380 |
381 js_side->SetCppSide(cpp_side_ptr.Pass()); | 381 js_side->SetCppSide(cpp_side_ptr.Pass()); |
382 | 382 |
383 gin::IsolateHolder::Initialize(gin::IsolateHolder::kStrictMode, | 383 gin::IsolateHolder::Initialize(gin::IsolateHolder::kStrictMode, |
| 384 gin::IsolateHolder::kStableV8Extras, |
384 gin::ArrayBufferAllocator::SharedInstance()); | 385 gin::ArrayBufferAllocator::SharedInstance()); |
385 gin::IsolateHolder instance; | 386 gin::IsolateHolder instance; |
386 MojoRunnerDelegate delegate; | 387 MojoRunnerDelegate delegate; |
387 gin::ShellRunner runner(&delegate, instance.isolate()); | 388 gin::ShellRunner runner(&delegate, instance.isolate()); |
388 delegate.Start(&runner, js_side_proxy.PassMessagePipe().release().value(), | 389 delegate.Start(&runner, js_side_proxy.PassMessagePipe().release().value(), |
389 test); | 390 test); |
390 | 391 |
391 run_loop_.Run(); | 392 run_loop_.Run(); |
392 } | 393 } |
393 | 394 |
(...skipping 24 matching lines...) Expand all Loading... |
418 } | 419 } |
419 | 420 |
420 TEST_F(JsToCppTest, BackPointer) { | 421 TEST_F(JsToCppTest, BackPointer) { |
421 BackPointerCppSideConnection cpp_side_connection; | 422 BackPointerCppSideConnection cpp_side_connection; |
422 RunTest("mojo/edk/js/tests/js_to_cpp_tests", &cpp_side_connection); | 423 RunTest("mojo/edk/js/tests/js_to_cpp_tests", &cpp_side_connection); |
423 EXPECT_TRUE(cpp_side_connection.DidSucceed()); | 424 EXPECT_TRUE(cpp_side_connection.DidSucceed()); |
424 } | 425 } |
425 | 426 |
426 } // namespace edk | 427 } // namespace edk |
427 } // namespace mojo | 428 } // namespace mojo |
OLD | NEW |