Disable some flaky screen/desktop capture tests on Linux.
Specifically: ScreenCapturerTest.StartCapture ScreenCapturerTest.Capture WindowCapturerTest.Capture Also adding a DCHECK for the capturer actually being created, since it seems like that's the problem. TBR=zijiehe@chromium.org Bug: webrtc:7830 Change-Id: I200dc0c15f5039b95f591597bc00d3f1084ae876 Reviewed-on: https://webrtc-review.googlesource.com/9562 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20297}
This commit is contained in:
committed by
Commit Bot
parent
f1c6db1c02
commit
569f4e7e58
@ -35,6 +35,7 @@ class ScreenCapturerTest : public testing::Test {
|
||||
void SetUp() override {
|
||||
capturer_ = DesktopCapturer::CreateScreenCapturer(
|
||||
DesktopCaptureOptions::CreateDefault());
|
||||
RTC_DCHECK(capturer_);
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -109,11 +110,22 @@ TEST_F(ScreenCapturerTest, GetScreenListAndSelectScreen) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ScreenCapturerTest, StartCapturer) {
|
||||
// Flaky on Linux. See: crbug.com/webrtc/7830
|
||||
#if defined(WEBRTC_LINUX)
|
||||
#define MAYBE_StartCapturer DISABLED_StartCaptuerer
|
||||
#else
|
||||
#define MAYBE_StartCapturer StartCapturer
|
||||
#endif
|
||||
TEST_F(ScreenCapturerTest, MAYBE_StartCapturer) {
|
||||
capturer_->Start(&callback_);
|
||||
}
|
||||
|
||||
TEST_F(ScreenCapturerTest, Capture) {
|
||||
#if defined(WEBRTC_LINUX)
|
||||
#define MAYBE_Capture DISABLED_Capture
|
||||
#else
|
||||
#define MAYBE_Capture Capture
|
||||
#endif
|
||||
TEST_F(ScreenCapturerTest, MAYBE_Capture) {
|
||||
// Assume that Start() treats the screen as invalid initially.
|
||||
std::unique_ptr<DesktopFrame> frame;
|
||||
EXPECT_CALL(callback_,
|
||||
|
||||
@ -24,6 +24,7 @@ class WindowCapturerTest : public testing::Test,
|
||||
void SetUp() override {
|
||||
capturer_ = DesktopCapturer::CreateWindowCapturer(
|
||||
DesktopCaptureOptions::CreateDefault());
|
||||
RTC_DCHECK(capturer_);
|
||||
}
|
||||
|
||||
void TearDown() override {}
|
||||
@ -50,6 +51,12 @@ TEST_F(WindowCapturerTest, Enumerate) {
|
||||
}
|
||||
}
|
||||
|
||||
// Flaky on Linux. See: crbug.com/webrtc/7830
|
||||
#if defined(WEBRTC_LINUX)
|
||||
#define MAYBE_Capture DISABLED_Capture
|
||||
#else
|
||||
#define MAYBE_Capture Capture
|
||||
#endif
|
||||
// Verify we can capture a window.
|
||||
//
|
||||
// TODO(sergeyu): Currently this test just looks at the windows that already
|
||||
@ -57,7 +64,7 @@ TEST_F(WindowCapturerTest, Enumerate) {
|
||||
// is no easy cross-platform way to create new windows (potentially we could
|
||||
// have a python script showing Tk dialog, but launching code will differ
|
||||
// between platforms).
|
||||
TEST_F(WindowCapturerTest, Capture) {
|
||||
TEST_F(WindowCapturerTest, MAYBE_Capture) {
|
||||
DesktopCapturer::SourceList sources;
|
||||
capturer_->Start(this);
|
||||
EXPECT_TRUE(capturer_->GetSourceList(&sources));
|
||||
|
||||
Reference in New Issue
Block a user