OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/macros.h" | 6 #include "base/macros.h" |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "content/browser/webrtc/webrtc_content_browsertest_base.h" | 9 #include "content/browser/webrtc/webrtc_content_browsertest_base.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 }; | 66 }; |
67 | 67 |
68 IN_PROC_BROWSER_TEST_F(WebRtcMediaRecorderTest, Start) { | 68 IN_PROC_BROWSER_TEST_F(WebRtcMediaRecorderTest, Start) { |
69 MakeTypicalCall("testStartAndRecorderState();", kMediaRecorderHtmlFile); | 69 MakeTypicalCall("testStartAndRecorderState();", kMediaRecorderHtmlFile); |
70 } | 70 } |
71 | 71 |
72 IN_PROC_BROWSER_TEST_F(WebRtcMediaRecorderTest, StartAndStop) { | 72 IN_PROC_BROWSER_TEST_F(WebRtcMediaRecorderTest, StartAndStop) { |
73 MakeTypicalCall("testStartStopAndRecorderState();", kMediaRecorderHtmlFile); | 73 MakeTypicalCall("testStartStopAndRecorderState();", kMediaRecorderHtmlFile); |
74 } | 74 } |
75 | 75 |
76 // Flaky on Linux Tsan (crbug.com/736268) | 76 IN_PROC_BROWSER_TEST_P(WebRtcMediaRecorderTest, StartAndDataAvailable) { |
77 #if defined(THREAD_SANITIZER) | |
78 #define MAYBE_StartAndDataAvailable DISABLED_StartAndDataAvailable | |
79 #else | |
80 #define MAYBE_StartAndDataAvailable StartAndDataAvailable | |
81 #endif | |
82 IN_PROC_BROWSER_TEST_P(WebRtcMediaRecorderTest, MAYBE_StartAndDataAvailable) { | |
83 MaybeForceDisableEncodeAccelerator(GetParam().disable_accelerator); | 77 MaybeForceDisableEncodeAccelerator(GetParam().disable_accelerator); |
84 MakeTypicalCall(base::StringPrintf("testStartAndDataAvailable(\"%s\");", | 78 MakeTypicalCall(base::StringPrintf("testStartAndDataAvailable(\"%s\");", |
85 GetParam().mime_type.c_str()), | 79 GetParam().mime_type.c_str()), |
86 kMediaRecorderHtmlFile); | 80 kMediaRecorderHtmlFile); |
87 } | 81 } |
88 | 82 |
89 IN_PROC_BROWSER_TEST_P(WebRtcMediaRecorderTest, StartWithTimeSlice) { | 83 IN_PROC_BROWSER_TEST_P(WebRtcMediaRecorderTest, StartWithTimeSlice) { |
90 MaybeForceDisableEncodeAccelerator(GetParam().disable_accelerator); | 84 MaybeForceDisableEncodeAccelerator(GetParam().disable_accelerator); |
91 MakeTypicalCall(base::StringPrintf("testStartWithTimeSlice(\"%s\");", | 85 MakeTypicalCall(base::StringPrintf("testStartWithTimeSlice(\"%s\");", |
92 GetParam().mime_type.c_str()), | 86 GetParam().mime_type.c_str()), |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 MakeTypicalCall("testTwoChannelAudio();", kMediaRecorderHtmlFile); | 137 MakeTypicalCall("testTwoChannelAudio();", kMediaRecorderHtmlFile); |
144 } | 138 } |
145 | 139 |
146 IN_PROC_BROWSER_TEST_P(WebRtcMediaRecorderTest, RecordWithTransparency) { | 140 IN_PROC_BROWSER_TEST_P(WebRtcMediaRecorderTest, RecordWithTransparency) { |
147 MaybeForceDisableEncodeAccelerator(GetParam().disable_accelerator); | 141 MaybeForceDisableEncodeAccelerator(GetParam().disable_accelerator); |
148 MakeTypicalCall(base::StringPrintf("testRecordWithTransparency(\"%s\");", | 142 MakeTypicalCall(base::StringPrintf("testRecordWithTransparency(\"%s\");", |
149 GetParam().mime_type.c_str()), | 143 GetParam().mime_type.c_str()), |
150 kMediaRecorderHtmlFile); | 144 kMediaRecorderHtmlFile); |
151 } | 145 } |
152 | 146 |
153 // Flaky on Linux Tsan (crbug.com/736268) | 147 IN_PROC_BROWSER_TEST_F(WebRtcMediaRecorderTest, IllegalStopThrowsDOMError) { |
154 #if defined(THREAD_SANITIZER) | |
155 #define MAYBE_IllegalStopThrowsDOMError DISABLED_IllegalStopThrowsDOMError | |
156 #else | |
157 #define MAYBE_IllegalStopThrowsDOMError IllegalStopThrowsDOMError | |
158 #endif | |
159 IN_PROC_BROWSER_TEST_F(WebRtcMediaRecorderTest, | |
160 MAYBE_IllegalStopThrowsDOMError) { | |
161 MakeTypicalCall("testIllegalStopThrowsDOMError();", kMediaRecorderHtmlFile); | 148 MakeTypicalCall("testIllegalStopThrowsDOMError();", kMediaRecorderHtmlFile); |
162 } | 149 } |
163 | 150 |
164 // Flaky on Linux Tsan (crbug.com/736268) | |
165 #if defined(THREAD_SANITIZER) | |
166 #define MAYBE_IllegalStartWhileRecordingThrowsDOMError \ | |
167 DISABLED_IllegalStartWhileRecordingThrowsDOMError | |
168 #else | |
169 #define MAYBE_IllegalStartWhileRecordingThrowsDOMError \ | |
170 IllegalStartWhileRecordingThrowsDOMError | |
171 #endif | |
172 IN_PROC_BROWSER_TEST_F(WebRtcMediaRecorderTest, | 151 IN_PROC_BROWSER_TEST_F(WebRtcMediaRecorderTest, |
173 MAYBE_IllegalStartWhileRecordingThrowsDOMError) { | 152 IllegalStartWhileRecordingThrowsDOMError) { |
174 MakeTypicalCall("testIllegalStartInRecordingStateThrowsDOMError();", | 153 MakeTypicalCall("testIllegalStartInRecordingStateThrowsDOMError();", |
175 kMediaRecorderHtmlFile); | 154 kMediaRecorderHtmlFile); |
176 } | 155 } |
177 | 156 |
178 // Flaky on Linux Tsan (crbug.com/736268) | 157 // Flaky on Linux Tsan (crbug.com/736268) |
179 #if defined(THREAD_SANITIZER) | 158 #if defined(THREAD_SANITIZER) |
180 #define MAYBE_IllegalStartWhilePausedThrowsDOMError \ | 159 #define MAYBE_IllegalStartWhilePausedThrowsDOMError \ |
181 DISABLED_IllegalStartWhilePausedThrowsDOMError | 160 DISABLED_IllegalStartWhilePausedThrowsDOMError |
182 #else | 161 #else |
183 #define MAYBE_IllegalStartWhilePausedThrowsDOMError \ | 162 #define MAYBE_IllegalStartWhilePausedThrowsDOMError \ |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 RemovingTrackFromMediaStreamFiresErrorEvent) { | 220 RemovingTrackFromMediaStreamFiresErrorEvent) { |
242 MakeTypicalCall("testRemovingTrackFromMediaStreamFiresErrorEvent();", | 221 MakeTypicalCall("testRemovingTrackFromMediaStreamFiresErrorEvent();", |
243 kMediaRecorderHtmlFile); | 222 kMediaRecorderHtmlFile); |
244 } | 223 } |
245 | 224 |
246 INSTANTIATE_TEST_CASE_P(, | 225 INSTANTIATE_TEST_CASE_P(, |
247 WebRtcMediaRecorderTest, | 226 WebRtcMediaRecorderTest, |
248 testing::ValuesIn(kEncodingParameters)); | 227 testing::ValuesIn(kEncodingParameters)); |
249 | 228 |
250 } // namespace content | 229 } // namespace content |
OLD | NEW |