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

Unified Diff: content/browser/media/capture/desktop_capture_device_unittest.cc

Issue 404613007: Fix DesktopCaptureDeviceTest to shutdown worker pool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/desktop_capture_device_unittest.cc
diff --git a/content/browser/media/capture/desktop_capture_device_unittest.cc b/content/browser/media/capture/desktop_capture_device_unittest.cc
index 0c1a360e2923a54142d95e17a3823a83db1789b1..9d2da0f31a0765e59feceb2d544398d3bcf3ba80 100644
--- a/content/browser/media/capture/desktop_capture_device_unittest.cc
+++ b/content/browser/media/capture/desktop_capture_device_unittest.cc
@@ -141,6 +141,11 @@ class DesktopCaptureDeviceTest : public testing::Test {
worker_pool_ = new base::SequencedWorkerPool(3, "TestCaptureThread");
}
+ virtual void TearDown() OVERRIDE {
+ worker_pool_->Shutdown();
+ message_loop_.RunUntilIdle();
+ }
+
void CreateScreenCaptureDevice(scoped_ptr<webrtc::DesktopCapturer> capturer) {
capture_device_.reset(new DesktopCaptureDevice(
worker_pool_->GetSequencedTaskRunner(worker_pool_->GetSequenceToken()),
@@ -150,6 +155,8 @@ class DesktopCaptureDeviceTest : public testing::Test {
}
protected:
+ base::MessageLoop message_loop_;
Ryan Sleevi 2014/07/21 18:43:32 Out of curiousity, does this use any //content Bro
Sergey Ulanov 2014/07/22 00:08:22 DesktopCaptureDevice::Create() does use BrowserThr
+
scoped_refptr<base::SequencedWorkerPool> worker_pool_;
scoped_ptr<base::Thread> thread_;
scoped_ptr<DesktopCaptureDevice> capture_device_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698