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

Side by Side Diff: media/video/capture/video_capture_device_unittest.cc

Issue 8879032: Removing MessageLoop::QuitTask() from media/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fixed. Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « media/tools/player_x11/player_x11.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "base/test/test_timeouts.h" 8 #include "base/test/test_timeouts.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "media/video/capture/fake_video_capture_device.h" 10 #include "media/video/capture/fake_video_capture_device.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 private: 59 private:
60 base::WaitableEvent* wait_event_; 60 base::WaitableEvent* wait_event_;
61 }; 61 };
62 62
63 class VideoCaptureDeviceTest : public testing::Test { 63 class VideoCaptureDeviceTest : public testing::Test {
64 public: 64 public:
65 VideoCaptureDeviceTest(): wait_event_(false, false) { } 65 VideoCaptureDeviceTest(): wait_event_(false, false) { }
66 66
67 void PostQuitTask() { 67 void PostQuitTask() {
68 loop_->PostTask(FROM_HERE, new MessageLoop::QuitTask); 68 loop_->PostTask(FROM_HERE, MessageLoop::QuitClosure());
69 loop_->Run(); 69 loop_->Run();
70 } 70 }
71 71
72 protected: 72 protected:
73 virtual void SetUp() { 73 virtual void SetUp() {
74 frame_observer_.reset(new MockFrameObserver(&wait_event_)); 74 frame_observer_.reset(new MockFrameObserver(&wait_event_));
75 loop_.reset(new MessageLoopForUI()); 75 loop_.reset(new MessageLoopForUI());
76 } 76 }
77 77
78 virtual void TearDown() { 78 virtual void TearDown() {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 device->Allocate(640, 480, 30, frame_observer_.get()); 277 device->Allocate(640, 480, 30, frame_observer_.get());
278 278
279 device->Start(); 279 device->Start();
280 EXPECT_TRUE(wait_event_.TimedWait(base::TimeDelta::FromMilliseconds( 280 EXPECT_TRUE(wait_event_.TimedWait(base::TimeDelta::FromMilliseconds(
281 TestTimeouts::action_max_timeout_ms()))); 281 TestTimeouts::action_max_timeout_ms())));
282 device->Stop(); 282 device->Stop();
283 device->DeAllocate(); 283 device->DeAllocate();
284 } 284 }
285 285
286 }; // namespace media 286 }; // namespace media
OLDNEW
« no previous file with comments | « media/tools/player_x11/player_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698