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 "chrome/browser/media/webrtc_browsertest_base.h" | 6 #include "chrome/browser/media/webrtc_browsertest_base.h" |
7 #include "chrome/browser/media/webrtc_browsertest_common.h" | 7 #include "chrome/browser/media/webrtc_browsertest_common.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_tabstrip.h" | 9 #include "chrome/browser/ui/browser_tabstrip.h" |
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 #else | 75 #else |
76 return false; | 76 return false; |
77 #endif | 77 #endif |
78 } | 78 } |
79 }; | 79 }; |
80 | 80 |
81 // This test is manual because the test results can vary heavily depending on | 81 // This test is manual because the test results can vary heavily depending on |
82 // which webcam or drivers you have on the system. | 82 // which webcam or drivers you have on the system. |
83 IN_PROC_BROWSER_TEST_P(WebRtcWebcamBrowserTest, | 83 IN_PROC_BROWSER_TEST_P(WebRtcWebcamBrowserTest, |
84 MANUAL_TestAcquiringAndReacquiringWebcam) { | 84 MANUAL_TestAcquiringAndReacquiringWebcam) { |
85 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 85 ASSERT_TRUE(embedded_test_server()->Start()); |
86 GURL url(embedded_test_server()->GetURL(kMainWebrtcTestHtmlPage)); | 86 GURL url(embedded_test_server()->GetURL(kMainWebrtcTestHtmlPage)); |
87 ui_test_utils::NavigateToURL(browser(), url); | 87 ui_test_utils::NavigateToURL(browser(), url); |
88 content::WebContents* tab = | 88 content::WebContents* tab = |
89 browser()->tab_strip_model()->GetActiveWebContents(); | 89 browser()->tab_strip_model()->GetActiveWebContents(); |
90 | 90 |
91 if (!HasWebcamAvailableOnSystem(tab)) { | 91 if (!HasWebcamAvailableOnSystem(tab)) { |
92 LOG(INFO) << "No webcam found on bot: skipping..."; | 92 LOG(INFO) << "No webcam found on bot: skipping..."; |
93 return; | 93 return; |
94 } | 94 } |
95 | 95 |
(...skipping 15 matching lines...) Expand all Loading... |
111 | 111 |
112 EXPECT_EQ("1280x720", | 112 EXPECT_EQ("1280x720", |
113 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints720p)); | 113 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints720p)); |
114 EXPECT_EQ("1920x1080", | 114 EXPECT_EQ("1920x1080", |
115 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints1080p)); | 115 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints1080p)); |
116 } | 116 } |
117 | 117 |
118 INSTANTIATE_TEST_CASE_P(WebRtcWebcamBrowserTests, | 118 INSTANTIATE_TEST_CASE_P(WebRtcWebcamBrowserTests, |
119 WebRtcWebcamBrowserTest, | 119 WebRtcWebcamBrowserTest, |
120 testing::ValuesIn(kTestConfigFlags)); | 120 testing::ValuesIn(kTestConfigFlags)); |
OLD | NEW |