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

Side by Side Diff: mojo/public/cpp/bindings/tests/bindings_perftest.cc

Issue 1997473005: Remove requirement that mojo::Environment be instantiated. (Closed) Base URL: https://github.com/domokit/mojo.git@work797_no_utility_tls
Patch Set: SetDefaultAsyncWaiter Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mojo/public/cpp/bindings/binding.h" 5 #include "mojo/public/cpp/bindings/binding.h"
6 #include "mojo/public/cpp/test_support/test_support.h" 6 #include "mojo/public/cpp/test_support/test_support.h"
7 #include "mojo/public/cpp/utility/run_loop.h" 7 #include "mojo/public/cpp/utility/run_loop.h"
8 #include "mojo/public/interfaces/bindings/tests/ping_service.mojom.h" 8 #include "mojo/public/interfaces/bindings/tests/ping_service.mojom.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 binding.Bind(GetProxy(&service)); 76 binding.Bind(GetProxy(&service));
77 } 77 }
78 78
79 PingServiceImpl impl; 79 PingServiceImpl impl;
80 test::PingServicePtr service; 80 test::PingServicePtr service;
81 Binding<test::PingService> binding; 81 Binding<test::PingService> binding;
82 }; 82 };
83 83
84 class MojoBindingsPerftest : public testing::Test { 84 class MojoBindingsPerftest : public testing::Test {
85 protected: 85 protected:
86 Environment env_;
87 RunLoop run_loop_; 86 RunLoop run_loop_;
88 }; 87 };
89 88
90 TEST_F(MojoBindingsPerftest, InProcessPingPong) { 89 TEST_F(MojoBindingsPerftest, InProcessPingPong) {
91 test::PingServicePtr service; 90 test::PingServicePtr service;
92 PingServiceImpl impl; 91 PingServiceImpl impl;
93 Binding<test::PingService> binding(&impl, GetProxy(&service)); 92 Binding<test::PingService> binding(&impl, GetProxy(&service));
94 PingPongTest test(service.Pass()); 93 PingPongTest test(service.Pass());
95 94
96 { 95 {
(...skipping 20 matching lines...) Expand all
117 "InProcessPingPong", "1000_Inactive", 116 "InProcessPingPong", "1000_Inactive",
118 kIterations / MojoTicksToSeconds(end_time - start_time), 117 kIterations / MojoTicksToSeconds(end_time - start_time),
119 "pings/second"); 118 "pings/second");
120 119
121 delete[] inactive_services; 120 delete[] inactive_services;
122 } 121 }
123 } 122 }
124 123
125 } // namespace 124 } // namespace
126 } // namespace mojo 125 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/binding_unittest.cc ('k') | mojo/public/cpp/bindings/tests/connector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698