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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #include "chrome/browser/media/webrtc_browsertest_base.h" | 7 #include "chrome/browser/media/webrtc_browsertest_base.h" |
| 8 #include "chrome/browser/media/webrtc_browsertest_common.h" | 8 #include "chrome/browser/media/webrtc_browsertest_common.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_tabstrip.h" | 10 #include "chrome/browser/ui/browser_tabstrip.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 // This test is manual because the test results can vary heavily depending on | 71 // This test is manual because the test results can vary heavily depending on |
| 72 // which webcam or drivers you have on the system. | 72 // which webcam or drivers you have on the system. |
| 73 IN_PROC_BROWSER_TEST_P(WebRtcWebcamBrowserTest, | 73 IN_PROC_BROWSER_TEST_P(WebRtcWebcamBrowserTest, |
| 74 MANUAL_TestAcquiringAndReacquiringWebcam) { | 74 MANUAL_TestAcquiringAndReacquiringWebcam) { |
| 75 ASSERT_TRUE(embedded_test_server()->Start()); | 75 ASSERT_TRUE(embedded_test_server()->Start()); |
| 76 GURL url(embedded_test_server()->GetURL(kMainWebrtcTestHtmlPage)); | 76 GURL url(embedded_test_server()->GetURL(kMainWebrtcTestHtmlPage)); |
| 77 ui_test_utils::NavigateToURL(browser(), url); | 77 ui_test_utils::NavigateToURL(browser(), url); |
| 78 content::WebContents* tab = | 78 content::WebContents* tab = |
| 79 browser()->tab_strip_model()->GetActiveWebContents(); | 79 browser()->tab_strip_model()->GetActiveWebContents(); |
| 80 | 80 |
| 81 if (!HasWebcamAvailableOnSystem(tab)) { | 81 if (!content::HasWebcamAvailableOnSystem(tab)) { |
| 82 LOG(INFO) << "No webcam found on bot: skipping..."; | 82 LOG(INFO) << "No webcam found on bot: skipping..."; |
|
mcasas
2016/09/06 15:34:54
nit: s/LOG/DLOG/ which is technically more
correct
lunalu1
2016/09/06 20:56:13
Done.
| |
| 83 return; | 83 return; |
| 84 } | 84 } |
| 85 | 85 |
| 86 EXPECT_EQ("320x240", | 86 EXPECT_EQ("320x240", |
| 87 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraintsQVGA)); | 87 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraintsQVGA)); |
| 88 EXPECT_EQ("640x480", | 88 EXPECT_EQ("640x480", |
| 89 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraintsVGA)); | 89 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraintsVGA)); |
| 90 EXPECT_EQ("640x360", | 90 EXPECT_EQ("640x360", |
| 91 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints360p)); | 91 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints360p)); |
| 92 EXPECT_EQ("1280x720", | 92 EXPECT_EQ("1280x720", |
| 93 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints720p)); | 93 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints720p)); |
| 94 EXPECT_EQ("1920x1080", | 94 EXPECT_EQ("1920x1080", |
| 95 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints1080p)); | 95 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints1080p)); |
| 96 } | 96 } |
| 97 | 97 |
| 98 INSTANTIATE_TEST_CASE_P(WebRtcWebcamBrowserTests, | 98 INSTANTIATE_TEST_CASE_P(WebRtcWebcamBrowserTests, |
| 99 WebRtcWebcamBrowserTest, | 99 WebRtcWebcamBrowserTest, |
| 100 testing::ValuesIn(kTestConfigFlags)); | 100 testing::ValuesIn(kTestConfigFlags)); |
| OLD | NEW |