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 "mojo/shell/shell_test_base.h" | 5 #include "mojo/shell/shell_test_base.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/i18n/time_formatting.h" | 8 #include "base/i18n/time_formatting.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } | 73 } |
74 TestTrackedRequestServicePtr request_tracking_; | 74 TestTrackedRequestServicePtr request_tracking_; |
75 }; | 75 }; |
76 | 76 |
77 class QuitMessageLoopErrorHandler : public ErrorHandler { | 77 class QuitMessageLoopErrorHandler : public ErrorHandler { |
78 public: | 78 public: |
79 QuitMessageLoopErrorHandler() {} | 79 QuitMessageLoopErrorHandler() {} |
80 virtual ~QuitMessageLoopErrorHandler() {} | 80 virtual ~QuitMessageLoopErrorHandler() {} |
81 | 81 |
82 // |ErrorHandler| implementation: | 82 // |ErrorHandler| implementation: |
83 virtual void OnConnectionError() OVERRIDE { | 83 virtual void OnConnectionError() override { |
84 base::MessageLoop::current()->QuitWhenIdle(); | 84 base::MessageLoop::current()->QuitWhenIdle(); |
85 } | 85 } |
86 | 86 |
87 private: | 87 private: |
88 DISALLOW_COPY_AND_ASSIGN(QuitMessageLoopErrorHandler); | 88 DISALLOW_COPY_AND_ASSIGN(QuitMessageLoopErrorHandler); |
89 }; | 89 }; |
90 | 90 |
91 // Tests that we can connect to a single service within a single app. | 91 // Tests that we can connect to a single service within a single app. |
92 TEST_F(ShellTestBaseTest, ConnectBasic) { | 92 TEST_F(ShellTestBaseTest, ConnectBasic) { |
93 InterfacePtr<TestService> service; | 93 InterfacePtr<TestService> service; |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 EXPECT_EQ(TestTimeService::Name_, reports[1].service_name); | 302 EXPECT_EQ(TestTimeService::Name_, reports[1].service_name); |
303 EXPECT_EQ(1U, reports[1].total_requests); | 303 EXPECT_EQ(1U, reports[1].total_requests); |
304 EXPECT_EQ(TestTimeService::Name_, reports[2].service_name); | 304 EXPECT_EQ(TestTimeService::Name_, reports[2].service_name); |
305 EXPECT_EQ(20U, reports[2].total_requests); | 305 EXPECT_EQ(20U, reports[2].total_requests); |
306 } | 306 } |
307 | 307 |
308 } // namespace | 308 } // namespace |
309 } // namespace test | 309 } // namespace test |
310 } // namespace shell | 310 } // namespace shell |
311 } // namespace mojo | 311 } // namespace mojo |
OLD | NEW |