Commit 59866378 authored by perkj@chromium.org's avatar perkj@chromium.org

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
parent 198c1cd3
// 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.
......@@ -12,14 +12,6 @@
#include "testing/gmock/include/gmock/gmock.h"
#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
......@@ -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()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment