OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/debug/trace_event_impl.h" | 6 #include "base/debug/trace_event_impl.h" |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/test/trace_event_analyzer.h" | 9 #include "base/test/trace_event_analyzer.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 302 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
303 | 303 |
304 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); | 304 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); |
305 NavigateToURL(shell(), url); | 305 NavigateToURL(shell(), url); |
306 | 306 |
307 ExecuteJavascriptAndWaitForOk( | 307 ExecuteJavascriptAndWaitForOk( |
308 base::StringPrintf("%s({video: true});", | 308 base::StringPrintf("%s({video: true});", |
309 kRenderDuplicatedMediastreamAndStop)); | 309 kRenderDuplicatedMediastreamAndStop)); |
310 } | 310 } |
311 | 311 |
312 // Flaky on Android. http://crbug.com/387895 | |
313 #if defined(OS_ANDROID) | |
314 #define MAYBE_GetAudioAndVideoStreamAndStop DISABLED_GetAudioAndVideoStreamAndSt
op | |
315 #else | |
316 #define MAYBE_GetAudioAndVideoStreamAndStop GetAudioAndVideoStreamAndStop | |
317 #endif | |
318 | |
319 IN_PROC_BROWSER_TEST_P(WebRtcGetUserMediaBrowserTest, | 312 IN_PROC_BROWSER_TEST_P(WebRtcGetUserMediaBrowserTest, |
320 MAYBE_GetAudioAndVideoStreamAndStop) { | 313 GetAudioAndVideoStreamAndStop) { |
321 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 314 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
322 | 315 |
323 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); | 316 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); |
324 NavigateToURL(shell(), url); | 317 NavigateToURL(shell(), url); |
325 | 318 |
326 ExecuteJavascriptAndWaitForOk(base::StringPrintf( | 319 ExecuteJavascriptAndWaitForOk(base::StringPrintf( |
327 "%s({video: true, audio: true});", kGetUserMediaAndStop)); | 320 "%s({video: true, audio: true});", kGetUserMediaAndStop)); |
328 } | 321 } |
329 | 322 |
330 IN_PROC_BROWSER_TEST_P(WebRtcGetUserMediaBrowserTest, | 323 IN_PROC_BROWSER_TEST_P(WebRtcGetUserMediaBrowserTest, |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 } | 613 } |
621 | 614 |
622 static const UserMediaSizes kAllUserMediaSizes[] = { | 615 static const UserMediaSizes kAllUserMediaSizes[] = { |
623 {320, 320, 180, 180, 10, 30}, | 616 {320, 320, 180, 180, 10, 30}, |
624 {320, 320, 240, 240, 10, 30}, | 617 {320, 320, 240, 240, 10, 30}, |
625 {640, 640, 360, 360, 10, 30}, | 618 {640, 640, 360, 360, 10, 30}, |
626 {640, 640, 480, 480, 10, 30}, | 619 {640, 640, 480, 480, 10, 30}, |
627 {960, 960, 720, 720, 10, 30}, | 620 {960, 960, 720, 720, 10, 30}, |
628 {1280, 1280, 720, 720, 10, 30}}; | 621 {1280, 1280, 720, 720, 10, 30}}; |
629 | 622 |
630 INSTANTIATE_TEST_CASE_P(UserMedia, | 623 INSTANTIATE_TEST_CASE_P(WebRtcConstraintsBrowserTests, |
631 WebRtcConstraintsBrowserTest, | 624 WebRtcConstraintsBrowserTest, |
632 testing::ValuesIn(kAllUserMediaSizes)); | 625 testing::ValuesIn(kAllUserMediaSizes)); |
633 | 626 |
634 } // namespace content | 627 } // namespace content |
OLD | NEW |