| 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 int large_value = 99999; | 496 int large_value = 99999; |
| 497 std::string call = GenerateGetUserMediaCall(kGetUserMediaAndExpectFailure, | 497 std::string call = GenerateGetUserMediaCall(kGetUserMediaAndExpectFailure, |
| 498 large_value, | 498 large_value, |
| 499 large_value, | 499 large_value, |
| 500 large_value, | 500 large_value, |
| 501 large_value, | 501 large_value, |
| 502 large_value, | 502 large_value, |
| 503 large_value); | 503 large_value); |
| 504 NavigateToURL(shell(), url); | 504 NavigateToURL(shell(), url); |
| 505 | 505 |
| 506 // TODO(perkj): A proper error code should be returned by gUM. | 506 EXPECT_EQ("ConstraintNotSatisfiedError", |
| 507 EXPECT_EQ("TrackStartError", ExecuteJavascriptAndReturnResult(call)); | 507 ExecuteJavascriptAndReturnResult(call)); |
| 508 } | 508 } |
| 509 | 509 |
| 510 // This test will make a simple getUserMedia page, verify that video is playing | 510 // This test will make a simple getUserMedia page, verify that video is playing |
| 511 // in a simple local <video>, and for a couple of seconds, collect some | 511 // in a simple local <video>, and for a couple of seconds, collect some |
| 512 // performance traces from VideoCaptureController colorspace conversion and | 512 // performance traces from VideoCaptureController colorspace conversion and |
| 513 // potential resizing. | 513 // potential resizing. |
| 514 IN_PROC_BROWSER_TEST_F( | 514 IN_PROC_BROWSER_TEST_F( |
| 515 WebRtcGetUserMediaBrowserTest, | 515 WebRtcGetUserMediaBrowserTest, |
| 516 TraceVideoCaptureControllerPerformanceDuringGetUserMedia) { | 516 TraceVideoCaptureControllerPerformanceDuringGetUserMedia) { |
| 517 RunGetUserMediaAndCollectMeasures( | 517 RunGetUserMediaAndCollectMeasures( |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 {640, 640, 360, 360, 10, 30}, | 613 {640, 640, 360, 360, 10, 30}, |
| 614 {640, 640, 480, 480, 10, 30}, | 614 {640, 640, 480, 480, 10, 30}, |
| 615 {960, 960, 720, 720, 10, 30}, | 615 {960, 960, 720, 720, 10, 30}, |
| 616 {1280, 1280, 720, 720, 10, 30}}; | 616 {1280, 1280, 720, 720, 10, 30}}; |
| 617 | 617 |
| 618 INSTANTIATE_TEST_CASE_P(UserMedia, | 618 INSTANTIATE_TEST_CASE_P(UserMedia, |
| 619 WebRtcConstraintsBrowserTest, | 619 WebRtcConstraintsBrowserTest, |
| 620 testing::ValuesIn(kAllUserMediaSizes)); | 620 testing::ValuesIn(kAllUserMediaSizes)); |
| 621 | 621 |
| 622 } // namespace content | 622 } // namespace content |
| OLD | NEW |