summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorperkj@chromium.org <perkj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-17 08:50:07 +0000
committerperkj@chromium.org <perkj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-17 08:50:07 +0000
commit5986637804f72efb3a88703f0cb410593f162bb4 (patch)
treed926311e4b6c5644d5b3037604dacc30e22a3f20
parent198c1cd3ac052bc3e38423ab2835b8cbe863b2b8 (diff)
downloadchromium_src-5986637804f72efb3a88703f0cb410593f162bb4.zip
chromium_src-5986637804f72efb3a88703f0cb410593f162bb4.tar.gz
chromium_src-5986637804f72efb3a88703f0cb410593f162bb4.tar.bz2
Remove flaky unit test VideoCaptureTest::AllocateSameCameraTwice
AllocateSameCameraTwice tested to open the same camera twice. However, this is can not happen in Chrome since the VideoCaptureManager ensure this. Further more, this have never worked on Mac and reasently have started to fail on Linux due to changes in the V4L2 driver behaviour. BUG= TEST= unit tests Review URL: http://codereview.chromium.org/10095011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132552 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--media/video/capture/video_capture_device_unittest.cc37
1 files changed, 1 insertions, 36 deletions
diff --git a/media/video/capture/video_capture_device_unittest.cc b/media/video/capture/video_capture_device_unittest.cc
index 7dd2e66..1524204 100644
--- a/media/video/capture/video_capture_device_unittest.cc
+++ b/media/video/capture/video_capture_device_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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()) {