Chromium Code Reviews| 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/debug/trace_event_impl.h" | 5 #include "base/debug/trace_event_impl.h" |
| 6 #include "base/json/json_reader.h" | 6 #include "base/json/json_reader.h" |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/test/trace_event_analyzer.h" | 8 #include "base/test/trace_event_analyzer.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "content/browser/media/webrtc_internals.h" | 10 #include "content/browser/media/webrtc_internals.h" |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 336 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, TwoGetUserMediaAndStop) { | 336 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, TwoGetUserMediaAndStop) { |
| 337 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 337 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 338 | 338 |
| 339 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); | 339 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); |
| 340 NavigateToURL(shell(), url); | 340 NavigateToURL(shell(), url); |
| 341 | 341 |
| 342 ExecuteJavascriptAndWaitForOk( | 342 ExecuteJavascriptAndWaitForOk( |
| 343 "twoGetUserMediaAndStop({video: true, audio: true});"); | 343 "twoGetUserMediaAndStop({video: true, audio: true});"); |
| 344 } | 344 } |
| 345 | 345 |
| 346 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, | |
| 347 GetUserMediaWithTooHighVideoConstraintsValues) { | |
| 348 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | |
| 349 | |
| 350 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); | |
| 351 | |
| 352 int large_value = 99999; | |
|
mcasas
2014/03/13 08:07:46
I'd recommend splitting this test in more navigate
perkj_chrome
2014/03/14 08:29:52
Discussed of line. This test is to test what happe
| |
| 353 std::string call = GenerateGetUserMediaCall(kGetUserMediaAndStop, | |
| 354 large_value, | |
| 355 large_value, | |
| 356 large_value, | |
| 357 large_value, | |
| 358 large_value, | |
| 359 large_value); | |
| 360 NavigateToURL(shell(), url); | |
| 361 | |
| 362 // TODO(perkj): A proper error code should be returned by gUM. | |
| 363 ASSERT_EQ("Error: GetUserMedia call failed with code undefined", | |
| 364 ExecuteJavascriptAndReturnResult(call)); | |
| 365 } | |
| 366 | |
| 346 // This test will make a simple getUserMedia page, verify that video is playing | 367 // This test will make a simple getUserMedia page, verify that video is playing |
| 347 // in a simple local <video>, and for a couple of seconds, collect some | 368 // in a simple local <video>, and for a couple of seconds, collect some |
| 348 // performance traces from VideoCaptureController colorspace conversion and | 369 // performance traces from VideoCaptureController colorspace conversion and |
| 349 // potential resizing. | 370 // potential resizing. |
| 350 IN_PROC_BROWSER_TEST_F( | 371 IN_PROC_BROWSER_TEST_F( |
| 351 WebRtcGetUserMediaBrowserTest, | 372 WebRtcGetUserMediaBrowserTest, |
| 352 TraceVideoCaptureControllerPerformanceDuringGetUserMedia) { | 373 TraceVideoCaptureControllerPerformanceDuringGetUserMedia) { |
| 353 RunGetUserMediaAndCollectMeasures( | 374 RunGetUserMediaAndCollectMeasures( |
| 354 10, | 375 10, |
| 355 "VideoCaptureController::OnIncomingCapturedData", | 376 "VideoCaptureController::OnIncomingCapturedData", |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 440 {640, 640, 480, 480, 30, 30}, | 461 {640, 640, 480, 480, 30, 30}, |
| 441 {960, 960, 720, 720, 30, 30}, | 462 {960, 960, 720, 720, 30, 30}, |
| 442 {1280, 1280, 720, 720, 30, 30}, | 463 {1280, 1280, 720, 720, 30, 30}, |
| 443 {1920, 1920, 1080, 1080, 30, 30}}; | 464 {1920, 1920, 1080, 1080, 30, 30}}; |
| 444 | 465 |
| 445 INSTANTIATE_TEST_CASE_P(UserMedia, | 466 INSTANTIATE_TEST_CASE_P(UserMedia, |
| 446 WebRtcConstraintsBrowserTest, | 467 WebRtcConstraintsBrowserTest, |
| 447 testing::ValuesIn(kAllUserMediaSizes)); | 468 testing::ValuesIn(kAllUserMediaSizes)); |
| 448 | 469 |
| 449 } // namespace content | 470 } // namespace content |
| OLD | NEW |