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 21 matching lines...) Expand all Loading... |
32 NULL | 32 NULL |
33 #endif | 33 #endif |
34 }; | 34 }; |
35 | 35 |
36 // These tests runs on real webcams and ensure WebRTC can acquire webcams | 36 // These tests runs on real webcams and ensure WebRTC can acquire webcams |
37 // correctly. They will do nothing if there are no webcams on the system. | 37 // correctly. They will do nothing if there are no webcams on the system. |
38 // The webcam on the system must support up to 1080p, or the test will fail. | 38 // The webcam on the system must support up to 1080p, or the test will fail. |
39 class WebRtcWebcamBrowserTest : public WebRtcTestBase, | 39 class WebRtcWebcamBrowserTest : public WebRtcTestBase, |
40 public testing::WithParamInterface<const char*> { | 40 public testing::WithParamInterface<const char*> { |
41 public: | 41 public: |
42 void SetUpCommandLine(CommandLine* command_line) override { | 42 void SetUpCommandLine(base::CommandLine* command_line) override { |
43 EXPECT_FALSE(command_line->HasSwitch( | 43 EXPECT_FALSE(command_line->HasSwitch( |
44 switches::kUseFakeDeviceForMediaStream)); | 44 switches::kUseFakeDeviceForMediaStream)); |
45 EXPECT_FALSE(command_line->HasSwitch( | 45 EXPECT_FALSE(command_line->HasSwitch( |
46 switches::kUseFakeUIForMediaStream)); | 46 switches::kUseFakeUIForMediaStream)); |
47 if (GetParam()) | 47 if (GetParam()) |
48 command_line->AppendSwitch(GetParam()); | 48 command_line->AppendSwitch(GetParam()); |
49 } | 49 } |
50 | 50 |
51 protected: | 51 protected: |
52 void SetUpInProcessBrowserTestFixture() override { | 52 void SetUpInProcessBrowserTestFixture() override { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 EXPECT_EQ("1280x720", | 105 EXPECT_EQ("1280x720", |
106 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints720p)); | 106 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints720p)); |
107 EXPECT_EQ("1920x1080", | 107 EXPECT_EQ("1920x1080", |
108 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints1080p)); | 108 GetUserMediaAndGetStreamSize(tab, kVideoCallConstraints1080p)); |
109 } | 109 } |
110 | 110 |
111 INSTANTIATE_TEST_CASE_P(WebRtcWebcamBrowserTests, | 111 INSTANTIATE_TEST_CASE_P(WebRtcWebcamBrowserTests, |
112 WebRtcWebcamBrowserTest, | 112 WebRtcWebcamBrowserTest, |
113 testing::ValuesIn(kTestConfigFlags)); | 113 testing::ValuesIn(kTestConfigFlags)); |
OLD | NEW |