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

Side by Side Diff: mojo/message_pump/handle_watcher_unittest.cc

Issue 1178423008: Provision to start base::SimpleTestTickClock at initial ticks Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/message_pump/handle_watcher.h" 5 #include "mojo/message_pump/handle_watcher.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 base::RunLoop* run_loop_; 114 base::RunLoop* run_loop_;
115 115
116 base::WeakPtrFactory<CallbackHelper> weak_factory_; 116 base::WeakPtrFactory<CallbackHelper> weak_factory_;
117 117
118 private: 118 private:
119 DISALLOW_COPY_AND_ASSIGN(CallbackHelper); 119 DISALLOW_COPY_AND_ASSIGN(CallbackHelper);
120 }; 120 };
121 121
122 class HandleWatcherTest : public testing::TestWithParam<MessageLoopConfig> { 122 class HandleWatcherTest : public testing::TestWithParam<MessageLoopConfig> {
123 public: 123 public:
124 HandleWatcherTest() : message_loop_(CreateMessageLoop(GetParam())) {} 124 HandleWatcherTest()
125 : tick_clock_(base::TimeTicks()),
126 message_loop_(CreateMessageLoop(GetParam())) {}
125 virtual ~HandleWatcherTest() { 127 virtual ~HandleWatcherTest() {
126 test::SetTickClockForTest(NULL); 128 test::SetTickClockForTest(NULL);
127 } 129 }
128 130
129 protected: 131 protected:
130 void TearDownMessageLoop() { 132 void TearDownMessageLoop() {
131 message_loop_.reset(); 133 message_loop_.reset();
132 } 134 }
133 135
134 void InstallTickClock() { 136 void InstallTickClock() {
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 message_loop.task_runner(), 477 message_loop.task_runner(),
476 &run_loop, &threads_active_counter)); 478 &run_loop, &threads_active_counter));
477 } 479 }
478 run_loop.Run(); 480 run_loop.Run();
479 ASSERT_EQ(0, threads_active_counter); 481 ASSERT_EQ(0, threads_active_counter);
480 } 482 }
481 483
482 } // namespace test 484 } // namespace test
483 } // namespace common 485 } // namespace common
484 } // namespace mojo 486 } // namespace mojo
OLDNEW
« no previous file with comments | « media/renderers/video_renderer_impl_unittest.cc ('k') | remoting/protocol/capture_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698