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

Unified Diff: media/video/capture/video_capture_device_unittest.cc

Issue 10095011: Remove flaky unit test VideoCaptureTest::AllocateSameCameraTwice (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Readded DISABLED_MAYBE_AllocateBadSize Created 8 years, 8 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: media/video/capture/video_capture_device_unittest.cc
diff --git a/media/video/capture/video_capture_device_unittest.cc b/media/video/capture/video_capture_device_unittest.cc
index 7dd2e660ded9fd74f534601b8b7aeb1216163297..3c59097f33e25bae900cd046715b5d4f6ec88ed9 100644
--- a/media/video/capture/video_capture_device_unittest.cc
+++ b/media/video/capture/video_capture_device_unittest.cc
@@ -13,14 +13,6 @@
#include "testing/gtest/include/gtest/gtest.h"
#if defined(OS_MACOSX)
-// The camera is 'locked' by the application once started on Mac OS X, not when
-// allocated as for Windows and Linux, and this test case will fail.
-#define MAYBE_AllocateSameCameraTwice DISABLED_AllocateSameCameraTwice
-#else
-#define MAYBE_AllocateSameCameraTwice AllocateSameCameraTwice
-#endif
-
-#if defined(OS_MACOSX)
// Mac/QTKit will always give you the size you ask for and this case will fail.
#define MAYBE_AllocateBadSize DISABLED_AllocateBadSize
#else
@@ -150,33 +142,6 @@ TEST_F(VideoCaptureDeviceTest, Capture720p) {
device->DeAllocate();
}
-TEST_F(VideoCaptureDeviceTest, MAYBE_AllocateSameCameraTwice) {
- VideoCaptureDevice::GetDeviceNames(&names_);
- if (!names_.size()) {
- LOG(WARNING) << "No camera available. Exiting test.";
- return;
- }
- scoped_ptr<VideoCaptureDevice> device1(
- VideoCaptureDevice::Create(names_.front()));
- ASSERT_TRUE(device1.get() != NULL);
-
- scoped_ptr<VideoCaptureDevice> device2(
- VideoCaptureDevice::Create(names_.front()));
- ASSERT_TRUE(device2.get() != NULL);
-
- // 1. Get info about the new resolution on the first allocated camera
- EXPECT_CALL(*frame_observer_, OnFrameInfo(640, 480, 30));
-
- device1->Allocate(640, 480, 30, frame_observer_.get());
-
- // 2. Error when trying to allocate the same camera again.
- EXPECT_CALL(*frame_observer_, OnErr());
- device2->Allocate(640, 480, 30, frame_observer_.get());
-
- device1->DeAllocate();
- device2->DeAllocate();
-}
-
TEST_F(VideoCaptureDeviceTest, MAYBE_AllocateBadSize) {
VideoCaptureDevice::GetDeviceNames(&names_);
if (!names_.size()) {
« 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