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

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

Issue 2026253003: Migrate WaitableEvent to enum-based constructor in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Created 4 years, 7 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
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 72d547a21428a672a1503f27b8092483e464a650..7bf45b8428e6b63ae3c0d0f60610956a8b89fa11 100644
--- a/content/browser/media/capture/desktop_capture_device_unittest.cc
+++ b/content/browser/media/capture/desktop_capture_device_unittest.cc
@@ -292,7 +292,9 @@ TEST_F(DesktopCaptureDeviceTest, MAYBE_Capture) {
CreateScreenCaptureDevice(std::move(capturer));
media::VideoCaptureFormat format;
- base::WaitableEvent done_event(false, false);
+ base::WaitableEvent done_event(
+ base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
int frame_size;
std::unique_ptr<MockDeviceClient> client(new MockDeviceClient());
@@ -328,7 +330,9 @@ TEST_F(DesktopCaptureDeviceTest, ScreenResolutionChangeConstantResolution) {
FormatChecker format_checker(gfx::Size(kTestFrameWidth1, kTestFrameHeight1),
gfx::Size(kTestFrameWidth1, kTestFrameHeight1));
- base::WaitableEvent done_event(false, false);
+ base::WaitableEvent done_event(
+ base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
std::unique_ptr<MockDeviceClient> client(new MockDeviceClient());
EXPECT_CALL(*client, OnError(_, _)).Times(0);
@@ -370,7 +374,9 @@ TEST_F(DesktopCaptureDeviceTest, ScreenResolutionChangeFixedAspectRatio) {
std::unique_ptr<webrtc::DesktopCapturer>(mock_capturer));
FormatChecker format_checker(gfx::Size(888, 500), gfx::Size(532, 300));
- base::WaitableEvent done_event(false, false);
+ base::WaitableEvent done_event(
+ base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
std::unique_ptr<MockDeviceClient> client(new MockDeviceClient());
EXPECT_CALL(*client, OnError(_,_)).Times(0);
@@ -416,7 +422,9 @@ TEST_F(DesktopCaptureDeviceTest, ScreenResolutionChangeVariableResolution) {
FormatChecker format_checker(gfx::Size(kTestFrameWidth1, kTestFrameHeight1),
gfx::Size(kTestFrameWidth2, kTestFrameHeight2));
- base::WaitableEvent done_event(false, false);
+ base::WaitableEvent done_event(
+ base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
std::unique_ptr<MockDeviceClient> client(new MockDeviceClient());
EXPECT_CALL(*client, OnError(_,_)).Times(0);
@@ -460,7 +468,9 @@ TEST_F(DesktopCaptureDeviceTest, UnpackedFrame) {
std::unique_ptr<webrtc::DesktopCapturer>(mock_capturer));
media::VideoCaptureFormat format;
- base::WaitableEvent done_event(false, false);
+ base::WaitableEvent done_event(
+ base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
int frame_size = 0;
output_frame_.reset(new webrtc::BasicDesktopFrame(
@@ -505,7 +515,9 @@ TEST_F(DesktopCaptureDeviceTest, InvertedFrame) {
std::unique_ptr<webrtc::DesktopCapturer>(mock_capturer));
media::VideoCaptureFormat format;
- base::WaitableEvent done_event(false, false);
+ base::WaitableEvent done_event(
+ base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
int frame_size = 0;
output_frame_.reset(new webrtc::BasicDesktopFrame(

Powered by Google App Engine
This is Rietveld 408576698