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

Side by Side Diff: mojo/shell/shell_test_base_unittest.cc

Issue 668663006: Standardize usage of virtual/override/final in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « mojo/shell/out_of_process_dynamic_service_runner.h ('k') | mojo/shell/test_child_process.h » ('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 "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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void SetAndQuitImpl(T* val, T result) { 67 void SetAndQuitImpl(T* val, T result) {
68 *val = result; 68 *val = result;
69 message_loop()->QuitWhenIdle(); 69 message_loop()->QuitWhenIdle();
70 } 70 }
71 TestTrackedRequestServicePtr request_tracking_; 71 TestTrackedRequestServicePtr request_tracking_;
72 }; 72 };
73 73
74 class QuitMessageLoopErrorHandler : public ErrorHandler { 74 class QuitMessageLoopErrorHandler : public ErrorHandler {
75 public: 75 public:
76 QuitMessageLoopErrorHandler() {} 76 QuitMessageLoopErrorHandler() {}
77 virtual ~QuitMessageLoopErrorHandler() {} 77 ~QuitMessageLoopErrorHandler() override {}
78 78
79 // |ErrorHandler| implementation: 79 // |ErrorHandler| implementation:
80 virtual void OnConnectionError() override { 80 void OnConnectionError() override {
81 base::MessageLoop::current()->QuitWhenIdle(); 81 base::MessageLoop::current()->QuitWhenIdle();
82 } 82 }
83 83
84 private: 84 private:
85 DISALLOW_COPY_AND_ASSIGN(QuitMessageLoopErrorHandler); 85 DISALLOW_COPY_AND_ASSIGN(QuitMessageLoopErrorHandler);
86 }; 86 };
87 87
88 // Tests that we can connect to a single service within a single app. 88 // Tests that we can connect to a single service within a single app.
89 TEST_F(ShellTestBaseTest, ConnectBasic) { 89 TEST_F(ShellTestBaseTest, ConnectBasic) {
90 InterfacePtr<TestService> service; 90 InterfacePtr<TestService> service;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 EXPECT_EQ(TestTimeService::Name_, reports[1].service_name); 299 EXPECT_EQ(TestTimeService::Name_, reports[1].service_name);
300 EXPECT_EQ(1U, reports[1].total_requests); 300 EXPECT_EQ(1U, reports[1].total_requests);
301 EXPECT_EQ(TestTimeService::Name_, reports[2].service_name); 301 EXPECT_EQ(TestTimeService::Name_, reports[2].service_name);
302 EXPECT_EQ(20U, reports[2].total_requests); 302 EXPECT_EQ(20U, reports[2].total_requests);
303 } 303 }
304 304
305 } // namespace 305 } // namespace
306 } // namespace test 306 } // namespace test
307 } // namespace shell 307 } // namespace shell
308 } // namespace mojo 308 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/out_of_process_dynamic_service_runner.h ('k') | mojo/shell/test_child_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698