| 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 "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // | 48 // |
| 49 // This test will bring up a AppRTC instance on localhost and verify that the | 49 // This test will bring up a AppRTC instance on localhost and verify that the |
| 50 // call gets up when connecting to the same room from two tabs in a browser. | 50 // call gets up when connecting to the same room from two tabs in a browser. |
| 51 class WebRtcApprtcBrowserTest : public WebRtcTestBase { | 51 class WebRtcApprtcBrowserTest : public WebRtcTestBase { |
| 52 public: | 52 public: |
| 53 WebRtcApprtcBrowserTest() {} | 53 WebRtcApprtcBrowserTest() {} |
| 54 | 54 |
| 55 void SetUpCommandLine(base::CommandLine* command_line) override { | 55 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 56 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream)); | 56 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream)); |
| 57 | 57 |
| 58 // Use fake devices in order to run on VMs. | 58 // The video playback will not work without a GPU, so force its use here. |
| 59 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); | 59 command_line->AppendSwitch(switches::kUseGpuInTests); |
| 60 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 61 switches::kUseFakeDeviceForMediaStream); |
| 60 } | 62 } |
| 61 | 63 |
| 62 void TearDown() override { | 64 void TearDown() override { |
| 63 // Kill any processes we may have brought up. Note: this isn't perfect, | 65 // Kill any processes we may have brought up. Note: this isn't perfect, |
| 64 // especially if the test hangs or if we're on Windows. | 66 // especially if the test hangs or if we're on Windows. |
| 65 LOG(INFO) << "Entering TearDown"; | 67 LOG(INFO) << "Entering TearDown"; |
| 66 if (dev_appserver_.IsValid()) | 68 if (dev_appserver_.IsValid()) |
| 67 base::KillProcess(dev_appserver_.Handle(), 0, false); | 69 base::KillProcess(dev_appserver_.Handle(), 0, false); |
| 68 if (collider_server_.IsValid()) | 70 if (collider_server_.IsValid()) |
| 69 base::KillProcess(collider_server_.Handle(), 0, false); | 71 base::KillProcess(collider_server_.Handle(), 0, false); |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 "&firefox_fake_device=1"); | 279 "&firefox_fake_device=1"); |
| 278 content::WebContents* chrome_tab = OpenPageAndAcceptUserMedia(room_url); | 280 content::WebContents* chrome_tab = OpenPageAndAcceptUserMedia(room_url); |
| 279 | 281 |
| 280 ASSERT_TRUE(LaunchFirefoxWithUrl(room_url)); | 282 ASSERT_TRUE(LaunchFirefoxWithUrl(room_url)); |
| 281 | 283 |
| 282 ASSERT_TRUE(WaitForCallToComeUp(chrome_tab)); | 284 ASSERT_TRUE(WaitForCallToComeUp(chrome_tab)); |
| 283 | 285 |
| 284 // Ensure Firefox manages to send video our way. | 286 // Ensure Firefox manages to send video our way. |
| 285 ASSERT_TRUE(DetectRemoteVideoPlaying(chrome_tab)); | 287 ASSERT_TRUE(DetectRemoteVideoPlaying(chrome_tab)); |
| 286 } | 288 } |
| OLD | NEW |