| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/memory/ref_counted_memory.h" | 9 #include "base/memory/ref_counted_memory.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 GenerateGetUserMediaCall(kGetUserMediaAndAnalyseAndStop, | 591 GenerateGetUserMediaCall(kGetUserMediaAndAnalyseAndStop, |
| 592 640, 640, 480, 480, 10, 30); | 592 640, 640, 480, 480, 10, 30); |
| 593 | 593 |
| 594 ASSERT_EQ("ConstraintNotSatisfiedError", | 594 ASSERT_EQ("ConstraintNotSatisfiedError", |
| 595 ExecuteJavascriptAndReturnResult(gum_with_impossible_constraints)); | 595 ExecuteJavascriptAndReturnResult(gum_with_impossible_constraints)); |
| 596 | 596 |
| 597 ASSERT_EQ("w=640:h=480", | 597 ASSERT_EQ("w=640:h=480", |
| 598 ExecuteJavascriptAndReturnResult(gum_with_vga_constraints)); | 598 ExecuteJavascriptAndReturnResult(gum_with_vga_constraints)); |
| 599 } | 599 } |
| 600 | 600 |
| 601 #if defined(OS_ANDROID) && defined(NDEBUG) |
| 602 #define MAYBE_TraceVideoCaptureControllerPerformanceDuringGetUserMedia DISABLED_
TraceVideoCaptureControllerPerformanceDuringGetUserMedia |
| 603 #else |
| 604 #define MAYBE_TraceVideoCaptureControllerPerformanceDuringGetUserMedia TraceVide
oCaptureControllerPerformanceDuringGetUserMedia |
| 605 #endif |
| 606 |
| 601 // This test will make a simple getUserMedia page, verify that video is playing | 607 // This test will make a simple getUserMedia page, verify that video is playing |
| 602 // in a simple local <video>, and for a couple of seconds, collect some | 608 // in a simple local <video>, and for a couple of seconds, collect some |
| 603 // performance traces from VideoCaptureController colorspace conversion and | 609 // performance traces from VideoCaptureController colorspace conversion and |
| 604 // potential resizing. | 610 // potential resizing. |
| 605 IN_PROC_BROWSER_TEST_F( | 611 IN_PROC_BROWSER_TEST_F( |
| 606 WebRtcGetUserMediaBrowserTest, | 612 WebRtcGetUserMediaBrowserTest, |
| 607 TraceVideoCaptureControllerPerformanceDuringGetUserMedia) { | 613 MAYBE_TraceVideoCaptureControllerPerformanceDuringGetUserMedia) { |
| 608 RunGetUserMediaAndCollectMeasures( | 614 RunGetUserMediaAndCollectMeasures( |
| 609 10, | 615 10, |
| 610 "VideoCaptureDeviceClient::OnIncomingCapturedData", | 616 "VideoCaptureDeviceClient::OnIncomingCapturedData", |
| 611 "VideoCaptureDeviceClient"); | 617 "VideoCaptureDeviceClient"); |
| 612 } | 618 } |
| 613 | 619 |
| 614 // This test calls getUserMedia and checks for aspect ratio behavior. | 620 // This test calls getUserMedia and checks for aspect ratio behavior. |
| 615 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, | 621 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, |
| 616 TestGetUserMediaAspectRatio4To3) { | 622 TestGetUserMediaAspectRatio4To3) { |
| 617 ASSERT_TRUE(embedded_test_server()->Start()); | 623 ASSERT_TRUE(embedded_test_server()->Start()); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 {640, 640, 360, 360, 10, 30}, | 782 {640, 640, 360, 360, 10, 30}, |
| 777 {640, 640, 480, 480, 10, 30}, | 783 {640, 640, 480, 480, 10, 30}, |
| 778 {960, 960, 720, 720, 10, 30}, | 784 {960, 960, 720, 720, 10, 30}, |
| 779 {1280, 1280, 720, 720, 10, 30}}; | 785 {1280, 1280, 720, 720, 10, 30}}; |
| 780 | 786 |
| 781 INSTANTIATE_TEST_CASE_P(UserMedia, | 787 INSTANTIATE_TEST_CASE_P(UserMedia, |
| 782 WebRtcConstraintsBrowserTest, | 788 WebRtcConstraintsBrowserTest, |
| 783 testing::ValuesIn(kAllUserMediaSizes)); | 789 testing::ValuesIn(kAllUserMediaSizes)); |
| 784 | 790 |
| 785 } // namespace content | 791 } // namespace content |
| OLD | NEW |