| 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, TwoGetUserMediaAndStop) { | 432 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, TwoGetUserMediaAndStop) { |
| 433 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 433 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 434 | 434 |
| 435 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); | 435 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); |
| 436 NavigateToURL(shell(), url); | 436 NavigateToURL(shell(), url); |
| 437 | 437 |
| 438 ExecuteJavascriptAndWaitForOk( | 438 ExecuteJavascriptAndWaitForOk( |
| 439 "twoGetUserMediaAndStop({video: true, audio: true});"); | 439 "twoGetUserMediaAndStop({video: true, audio: true});"); |
| 440 } | 440 } |
| 441 | 441 |
| 442 #if defined(OS_WIN) && !defined(NDEBUG) |
| 443 // Flaky on Webkit Win7 Debug bot: http://crbug.com/417756 |
| 444 #define MAYBE_TwoGetUserMediaWithEqualConstraints \ |
| 445 DISABLED_TwoGetUserMediaWithEqualConstraints |
| 446 #else |
| 447 #define MAYBE_TwoGetUserMediaWithEqualConstraints \ |
| 448 TwoGetUserMediaWithEqualConstraints |
| 449 #endif |
| 442 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, | 450 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, |
| 443 TwoGetUserMediaWithEqualConstraints) { | 451 MAYBE_TwoGetUserMediaWithEqualConstraints) { |
| 444 std::string constraints1 = "{video: true, audio: true}"; | 452 std::string constraints1 = "{video: true, audio: true}"; |
| 445 const std::string& constraints2 = constraints1; | 453 const std::string& constraints2 = constraints1; |
| 446 std::string expected_result = "w=640:h=480-w=640:h=480"; | 454 std::string expected_result = "w=640:h=480-w=640:h=480"; |
| 447 | 455 |
| 448 RunTwoGetTwoGetUserMediaWithDifferentContraints(constraints1, constraints2, | 456 RunTwoGetTwoGetUserMediaWithDifferentContraints(constraints1, constraints2, |
| 449 expected_result); | 457 expected_result); |
| 450 } | 458 } |
| 451 | 459 |
| 452 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, | 460 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, |
| 453 TwoGetUserMediaWithSecondVideoCropped) { | 461 TwoGetUserMediaWithSecondVideoCropped) { |
| 454 std::string constraints1 = "{video: true}"; | 462 std::string constraints1 = "{video: true}"; |
| 455 std::string constraints2 = "{video: {mandatory: {maxHeight: 360}}}"; | 463 std::string constraints2 = "{video: {mandatory: {maxHeight: 360}}}"; |
| 456 std::string expected_result = "w=640:h=480-w=640:h=360"; | 464 std::string expected_result = "w=640:h=480-w=640:h=360"; |
| 457 RunTwoGetTwoGetUserMediaWithDifferentContraints(constraints1, constraints2, | 465 RunTwoGetTwoGetUserMediaWithDifferentContraints(constraints1, constraints2, |
| 458 expected_result); | 466 expected_result); |
| 459 } | 467 } |
| 460 | 468 |
| 461 #if defined(OS_WIN) && !defined(NDEBUG) | 469 #if defined(OS_WIN) && !defined(NDEBUG) |
| 462 // Flaky on Webkit Win7 Debug bot: http://crbug.com/417756 | 470 // Flaky on Webkit Win7 Debug bot: http://crbug.com/417756 |
| 463 #define MAYBE_TwoGetUserMediaWithFirstHdSecondVga \ | 471 #define MAYBE_TwoGetUserMediaWithFirstHdSecondVga \ |
| 464 DISABLED_TwoGetUserMediaWithFirstHdSecondVga | 472 DISABLED_TwoGetUserMediaWithFirstHdSecondVga |
| 465 #else | 473 #else |
| 466 #define MAYBE_TwoGetUserMediaWithFirstHdSecondVga \ | 474 #define MAYBE_TwoGetUserMediaWithFirstHdSecondVga \ |
| 467 TwoGetUserMediaWithFirstHdSecondVga | 475 TwoGetUserMediaWithFirstHdSecondVga |
| 468 #endif | 476 #endif |
| 469 | |
| 470 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, | 477 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, |
| 471 MAYBE_TwoGetUserMediaWithFirstHdSecondVga) { | 478 MAYBE_TwoGetUserMediaWithFirstHdSecondVga) { |
| 472 std::string constraints1 = | 479 std::string constraints1 = |
| 473 "{video: {mandatory: {minWidth:1280 , minHeight: 720}}}"; | 480 "{video: {mandatory: {minWidth:1280 , minHeight: 720}}}"; |
| 474 std::string constraints2 = | 481 std::string constraints2 = |
| 475 "{video: {mandatory: {maxWidth:640 , maxHeight: 480}}}"; | 482 "{video: {mandatory: {maxWidth:640 , maxHeight: 480}}}"; |
| 476 std::string expected_result = "w=1280:h=720-w=640:h=480"; | 483 std::string expected_result = "w=1280:h=720-w=640:h=480"; |
| 477 RunTwoGetTwoGetUserMediaWithDifferentContraints(constraints1, constraints2, | 484 RunTwoGetTwoGetUserMediaWithDifferentContraints(constraints1, constraints2, |
| 478 expected_result); | 485 expected_result); |
| 479 } | 486 } |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 {640, 640, 360, 360, 10, 30}, | 630 {640, 640, 360, 360, 10, 30}, |
| 624 {640, 640, 480, 480, 10, 30}, | 631 {640, 640, 480, 480, 10, 30}, |
| 625 {960, 960, 720, 720, 10, 30}, | 632 {960, 960, 720, 720, 10, 30}, |
| 626 {1280, 1280, 720, 720, 10, 30}}; | 633 {1280, 1280, 720, 720, 10, 30}}; |
| 627 | 634 |
| 628 INSTANTIATE_TEST_CASE_P(UserMedia, | 635 INSTANTIATE_TEST_CASE_P(UserMedia, |
| 629 WebRtcConstraintsBrowserTest, | 636 WebRtcConstraintsBrowserTest, |
| 630 testing::ValuesIn(kAllUserMediaSizes)); | 637 testing::ValuesIn(kAllUserMediaSizes)); |
| 631 | 638 |
| 632 } // namespace content | 639 } // namespace content |
| OLD | NEW |