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

Side by Side Diff: mojo/public/cpp/utility/tests/run_loop_unittest.cc

Issue 644963004: Some more virtual/override updates. (Closed) Base URL: https://github.com/domokit/mojo.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
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/public/cpp/utility/run_loop.h" 5 #include "mojo/public/cpp/utility/run_loop.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "mojo/public/cpp/system/core.h" 9 #include "mojo/public/cpp/system/core.h"
10 #include "mojo/public/cpp/test_support/test_utils.h" 10 #include "mojo/public/cpp/test_support/test_utils.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 int error_count_; 43 int error_count_;
44 MojoResult last_error_result_; 44 MojoResult last_error_result_;
45 45
46 MOJO_DISALLOW_COPY_AND_ASSIGN(TestRunLoopHandler); 46 MOJO_DISALLOW_COPY_AND_ASSIGN(TestRunLoopHandler);
47 }; 47 };
48 48
49 class RunLoopTest : public testing::Test { 49 class RunLoopTest : public testing::Test {
50 public: 50 public:
51 RunLoopTest() {} 51 RunLoopTest() {}
52 52
53 virtual void SetUp() override { 53 void SetUp() override {
54 Test::SetUp(); 54 Test::SetUp();
55 RunLoop::SetUp(); 55 RunLoop::SetUp();
56 } 56 }
57 virtual void TearDown() override { 57 void TearDown() override {
58 RunLoop::TearDown(); 58 RunLoop::TearDown();
59 Test::TearDown(); 59 Test::TearDown();
60 } 60 }
61 61
62 private: 62 private:
63 MOJO_DISALLOW_COPY_AND_ASSIGN(RunLoopTest); 63 MOJO_DISALLOW_COPY_AND_ASSIGN(RunLoopTest);
64 }; 64 };
65 65
66 // Trivial test to verify Run() with no added handles returns. 66 // Trivial test to verify Run() with no added handles returns.
67 TEST_F(RunLoopTest, ExitsWithNoHandles) { 67 TEST_F(RunLoopTest, ExitsWithNoHandles) {
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 run_loop.AddHandler(&handler, 422 run_loop.AddHandler(&handler,
423 test_pipe.handle0.get(), 423 test_pipe.handle0.get(),
424 MOJO_HANDLE_SIGNAL_READABLE, 424 MOJO_HANDLE_SIGNAL_READABLE,
425 MOJO_DEADLINE_INDEFINITE); 425 MOJO_DEADLINE_INDEFINITE);
426 run_loop.PostDelayedTask(Closure(QuittingTask(&run_loop)), 0); 426 run_loop.PostDelayedTask(Closure(QuittingTask(&run_loop)), 0);
427 run_loop.Run(); 427 run_loop.Run();
428 } 428 }
429 429
430 } // namespace 430 } // namespace
431 } // namespace mojo 431 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/environment/tests/logging_unittest.cc ('k') | mojo/services/clipboard/clipboard_standalone_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698