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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 | 355 |
356 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, | 356 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, |
357 GetUserMediaWithMandatorySourceID) { | 357 GetUserMediaWithMandatorySourceID) { |
358 ASSERT_TRUE(embedded_test_server()->Start()); | 358 ASSERT_TRUE(embedded_test_server()->Start()); |
359 | 359 |
360 std::vector<std::string> audio_ids; | 360 std::vector<std::string> audio_ids; |
361 std::vector<std::string> video_ids; | 361 std::vector<std::string> video_ids; |
362 GetInputDevices(&audio_ids, &video_ids); | 362 GetInputDevices(&audio_ids, &video_ids); |
363 | 363 |
364 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); | 364 GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); |
| 365 NavigateToURL(shell(), url); |
365 | 366 |
366 // Test all combinations of mandatory sourceID; | 367 // Test all combinations of mandatory sourceID; |
367 for (std::vector<std::string>::const_iterator video_it = video_ids.begin(); | 368 for (std::vector<std::string>::const_iterator video_it = video_ids.begin(); |
368 video_it != video_ids.end(); ++video_it) { | 369 video_it != video_ids.end(); ++video_it) { |
369 for (std::vector<std::string>::const_iterator audio_it = audio_ids.begin(); | 370 for (std::vector<std::string>::const_iterator audio_it = audio_ids.begin(); |
370 audio_it != audio_ids.end(); ++audio_it) { | 371 audio_it != audio_ids.end(); ++audio_it) { |
371 NavigateToURL(shell(), url); | |
372 EXPECT_EQ(kOK, ExecuteJavascriptAndReturnResult( | 372 EXPECT_EQ(kOK, ExecuteJavascriptAndReturnResult( |
373 GenerateGetUserMediaWithMandatorySourceID( | 373 GenerateGetUserMediaWithMandatorySourceID( |
374 kGetUserMediaAndStop, | 374 kGetUserMediaAndStop, |
375 *audio_it, | 375 *audio_it, |
376 *video_it))); | 376 *video_it))); |
377 } | 377 } |
378 } | 378 } |
379 } | 379 } |
380 | 380 |
381 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, | 381 IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 {640, 640, 360, 360, 10, 30}, | 770 {640, 640, 360, 360, 10, 30}, |
771 {640, 640, 480, 480, 10, 30}, | 771 {640, 640, 480, 480, 10, 30}, |
772 {960, 960, 720, 720, 10, 30}, | 772 {960, 960, 720, 720, 10, 30}, |
773 {1280, 1280, 720, 720, 10, 30}}; | 773 {1280, 1280, 720, 720, 10, 30}}; |
774 | 774 |
775 INSTANTIATE_TEST_CASE_P(UserMedia, | 775 INSTANTIATE_TEST_CASE_P(UserMedia, |
776 WebRtcConstraintsBrowserTest, | 776 WebRtcConstraintsBrowserTest, |
777 testing::ValuesIn(kAllUserMediaSizes)); | 777 testing::ValuesIn(kAllUserMediaSizes)); |
778 | 778 |
779 } // namespace content | 779 } // namespace content |
OLD | NEW |