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

Side by Side Diff: mojo/edk/js/tests/js_to_cpp_tests.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 3 years, 12 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 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } // namespace 381 } // namespace
382 382
383 class JsToCppTest : public testing::Test { 383 class JsToCppTest : public testing::Test {
384 public: 384 public:
385 JsToCppTest() {} 385 JsToCppTest() {}
386 386
387 void RunTest(const std::string& test, CppSideConnection* cpp_side) { 387 void RunTest(const std::string& test, CppSideConnection* cpp_side) {
388 cpp_side->set_run_loop(&run_loop_); 388 cpp_side->set_run_loop(&run_loop_);
389 389
390 js_to_cpp::JsSidePtr js_side; 390 js_to_cpp::JsSidePtr js_side;
391 auto js_side_proxy = GetProxy(&js_side); 391 auto js_side_proxy = MakeRequest(&js_side);
392 392
393 cpp_side->set_js_side(js_side.get()); 393 cpp_side->set_js_side(js_side.get());
394 js_to_cpp::CppSidePtr cpp_side_ptr; 394 js_to_cpp::CppSidePtr cpp_side_ptr;
395 cpp_side->Bind(GetProxy(&cpp_side_ptr)); 395 cpp_side->Bind(MakeRequest(&cpp_side_ptr));
396 396
397 js_side->SetCppSide(std::move(cpp_side_ptr)); 397 js_side->SetCppSide(std::move(cpp_side_ptr));
398 398
399 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 399 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
400 gin::V8Initializer::LoadV8Snapshot(); 400 gin::V8Initializer::LoadV8Snapshot();
401 gin::V8Initializer::LoadV8Natives(); 401 gin::V8Initializer::LoadV8Natives();
402 #endif 402 #endif
403 403
404 gin::IsolateHolder::Initialize(gin::IsolateHolder::kStrictMode, 404 gin::IsolateHolder::Initialize(gin::IsolateHolder::kStrictMode,
405 gin::IsolateHolder::kStableV8Extras, 405 gin::IsolateHolder::kStableV8Extras,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 mojo::internal::ScopedSuppressValidationErrorLoggingForTests log_suppression; 447 mojo::internal::ScopedSuppressValidationErrorLoggingForTests log_suppression;
448 448
449 BackPointerCppSideConnection cpp_side_connection; 449 BackPointerCppSideConnection cpp_side_connection;
450 RunTest("mojo/edk/js/tests/js_to_cpp_tests", &cpp_side_connection); 450 RunTest("mojo/edk/js/tests/js_to_cpp_tests", &cpp_side_connection);
451 EXPECT_TRUE(cpp_side_connection.DidSucceed()); 451 EXPECT_TRUE(cpp_side_connection.DidSucceed());
452 } 452 }
453 453
454 } // namespace js 454 } // namespace js
455 } // namespace edk 455 } // namespace edk
456 } // namespace mojo 456 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/common/common_custom_types_unittest.cc ('k') | mojo/public/cpp/bindings/associated_interface_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698