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 IN_PROC_BROWSER_TEST_P(WebRtcMediaRecorderTest, StartAndDataAvailable) { | 76 // Flaky on Linux Tsan (crbug.com/736268) |
| 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) { |
77 MaybeForceDisableEncodeAccelerator(GetParam().disable_accelerator); | 83 MaybeForceDisableEncodeAccelerator(GetParam().disable_accelerator); |
78 MakeTypicalCall(base::StringPrintf("testStartAndDataAvailable(\"%s\");", | 84 MakeTypicalCall(base::StringPrintf("testStartAndDataAvailable(\"%s\");", |
79 GetParam().mime_type.c_str()), | 85 GetParam().mime_type.c_str()), |
80 kMediaRecorderHtmlFile); | 86 kMediaRecorderHtmlFile); |
81 } | 87 } |
82 | 88 |
83 IN_PROC_BROWSER_TEST_P(WebRtcMediaRecorderTest, StartWithTimeSlice) { | 89 IN_PROC_BROWSER_TEST_P(WebRtcMediaRecorderTest, StartWithTimeSlice) { |
84 MaybeForceDisableEncodeAccelerator(GetParam().disable_accelerator); | 90 MaybeForceDisableEncodeAccelerator(GetParam().disable_accelerator); |
85 MakeTypicalCall(base::StringPrintf("testStartWithTimeSlice(\"%s\");", | 91 MakeTypicalCall(base::StringPrintf("testStartWithTimeSlice(\"%s\");", |
86 GetParam().mime_type.c_str()), | 92 GetParam().mime_type.c_str()), |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 MakeTypicalCall("testTwoChannelAudio();", kMediaRecorderHtmlFile); | 143 MakeTypicalCall("testTwoChannelAudio();", kMediaRecorderHtmlFile); |
138 } | 144 } |
139 | 145 |
140 IN_PROC_BROWSER_TEST_P(WebRtcMediaRecorderTest, RecordWithTransparency) { | 146 IN_PROC_BROWSER_TEST_P(WebRtcMediaRecorderTest, RecordWithTransparency) { |
141 MaybeForceDisableEncodeAccelerator(GetParam().disable_accelerator); | 147 MaybeForceDisableEncodeAccelerator(GetParam().disable_accelerator); |
142 MakeTypicalCall(base::StringPrintf("testRecordWithTransparency(\"%s\");", | 148 MakeTypicalCall(base::StringPrintf("testRecordWithTransparency(\"%s\");", |
143 GetParam().mime_type.c_str()), | 149 GetParam().mime_type.c_str()), |
144 kMediaRecorderHtmlFile); | 150 kMediaRecorderHtmlFile); |
145 } | 151 } |
146 | 152 |
147 IN_PROC_BROWSER_TEST_F(WebRtcMediaRecorderTest, IllegalStopThrowsDOMError) { | 153 // Flaky on Linux Tsan (crbug.com/736268) |
| 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) { |
148 MakeTypicalCall("testIllegalStopThrowsDOMError();", kMediaRecorderHtmlFile); | 161 MakeTypicalCall("testIllegalStopThrowsDOMError();", kMediaRecorderHtmlFile); |
149 } | 162 } |
150 | 163 |
| 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 |
151 IN_PROC_BROWSER_TEST_F(WebRtcMediaRecorderTest, | 172 IN_PROC_BROWSER_TEST_F(WebRtcMediaRecorderTest, |
152 IllegalStartWhileRecordingThrowsDOMError) { | 173 MAYBE_IllegalStartWhileRecordingThrowsDOMError) { |
153 MakeTypicalCall("testIllegalStartInRecordingStateThrowsDOMError();", | 174 MakeTypicalCall("testIllegalStartInRecordingStateThrowsDOMError();", |
154 kMediaRecorderHtmlFile); | 175 kMediaRecorderHtmlFile); |
155 } | 176 } |
156 | 177 |
157 // Flaky on Linux Tsan (crbug.com/736268) | 178 // Flaky on Linux Tsan (crbug.com/736268) |
158 #if defined(THREAD_SANITIZER) | 179 #if defined(THREAD_SANITIZER) |
159 #define MAYBE_IllegalStartWhilePausedThrowsDOMError \ | 180 #define MAYBE_IllegalStartWhilePausedThrowsDOMError \ |
160 DISABLED_IllegalStartWhilePausedThrowsDOMError | 181 DISABLED_IllegalStartWhilePausedThrowsDOMError |
161 #else | 182 #else |
162 #define MAYBE_IllegalStartWhilePausedThrowsDOMError \ | 183 #define MAYBE_IllegalStartWhilePausedThrowsDOMError \ |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 RemovingTrackFromMediaStreamFiresErrorEvent) { | 241 RemovingTrackFromMediaStreamFiresErrorEvent) { |
221 MakeTypicalCall("testRemovingTrackFromMediaStreamFiresErrorEvent();", | 242 MakeTypicalCall("testRemovingTrackFromMediaStreamFiresErrorEvent();", |
222 kMediaRecorderHtmlFile); | 243 kMediaRecorderHtmlFile); |
223 } | 244 } |
224 | 245 |
225 INSTANTIATE_TEST_CASE_P(, | 246 INSTANTIATE_TEST_CASE_P(, |
226 WebRtcMediaRecorderTest, | 247 WebRtcMediaRecorderTest, |
227 testing::ValuesIn(kEncodingParameters)); | 248 testing::ValuesIn(kEncodingParameters)); |
228 | 249 |
229 } // namespace content | 250 } // namespace content |
OLD | NEW |