| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/files/file_enumerator.h" | 6 #include "base/files/file_enumerator.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/process/launch.h" | 8 #include "base/process/launch.h" |
| 9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // call gets up when connecting to the same room from two tabs in a browser. | 45 // call gets up when connecting to the same room from two tabs in a browser. |
| 46 class WebRtcApprtcBrowserTest : public WebRtcTestBase { | 46 class WebRtcApprtcBrowserTest : public WebRtcTestBase { |
| 47 public: | 47 public: |
| 48 WebRtcApprtcBrowserTest() {} | 48 WebRtcApprtcBrowserTest() {} |
| 49 | 49 |
| 50 void SetUpCommandLine(base::CommandLine* command_line) override { | 50 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 51 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream)); | 51 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream)); |
| 52 | 52 |
| 53 // The video playback will not work without a GPU, so force its use here. | 53 // The video playback will not work without a GPU, so force its use here. |
| 54 command_line->AppendSwitch(switches::kUseGpuInTests); | 54 command_line->AppendSwitch(switches::kUseGpuInTests); |
| 55 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 55 // This test fails on some Mac bots if no default devices are specified on |
| 56 switches::kUseFakeDeviceForMediaStream); | 56 // the command line. |
| 57 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| 58 switches::kUseFakeDeviceForMediaStream, |
| 59 "audio-input-default-id=default,video-input-default-id=default"); |
| 57 } | 60 } |
| 58 | 61 |
| 59 void TearDown() override { | 62 void TearDown() override { |
| 60 // Kill any processes we may have brought up. Note: this isn't perfect, | 63 // Kill any processes we may have brought up. Note: this isn't perfect, |
| 61 // especially if the test hangs or if we're on Windows. | 64 // especially if the test hangs or if we're on Windows. |
| 62 LOG(INFO) << "Entering TearDown"; | 65 LOG(INFO) << "Entering TearDown"; |
| 63 if (dev_appserver_.IsValid()) | 66 if (dev_appserver_.IsValid()) |
| 64 dev_appserver_.Terminate(0, false); | 67 dev_appserver_.Terminate(0, false); |
| 65 if (collider_server_.IsValid()) | 68 if (collider_server_.IsValid()) |
| 66 collider_server_.Terminate(0, false); | 69 collider_server_.Terminate(0, false); |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 InfoBarService::FromWebContents(chrome_tab), InfoBarResponder::ACCEPT); | 299 InfoBarService::FromWebContents(chrome_tab), InfoBarResponder::ACCEPT); |
| 297 ui_test_utils::NavigateToURL(browser(), room_url); | 300 ui_test_utils::NavigateToURL(browser(), room_url); |
| 298 | 301 |
| 299 ASSERT_TRUE(LaunchFirefoxWithUrl(room_url)); | 302 ASSERT_TRUE(LaunchFirefoxWithUrl(room_url)); |
| 300 | 303 |
| 301 ASSERT_TRUE(WaitForCallToComeUp(chrome_tab)); | 304 ASSERT_TRUE(WaitForCallToComeUp(chrome_tab)); |
| 302 | 305 |
| 303 // Ensure Firefox manages to send video our way. | 306 // Ensure Firefox manages to send video our way. |
| 304 ASSERT_TRUE(DetectRemoteVideoPlaying(chrome_tab)); | 307 ASSERT_TRUE(DetectRemoteVideoPlaying(chrome_tab)); |
| 305 } | 308 } |
| OLD | NEW |