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