| 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 "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" | 7 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" |
| 8 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h" | 8 #include "chrome/browser/media/webrtc/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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 void SetUpCommandLine(base::CommandLine* command_line) override { | 42 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 43 // Ensure the infobar is enabled, since we expect that in this test. | 43 // Ensure the infobar is enabled, since we expect that in this test. |
| 44 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream)); | 44 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream)); |
| 45 | 45 |
| 46 // Always use fake devices. | 46 // Always use fake devices. |
| 47 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); | 47 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); |
| 48 | 48 |
| 49 // Flag used by TestWebAudioMediaStream to force garbage collection. | 49 // Flag used by TestWebAudioMediaStream to force garbage collection. |
| 50 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); | 50 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); |
| 51 | |
| 52 // Flag used by |RunsAudioVideoWebRTCCallInTwoTabsGetStatsPromise|. | |
| 53 // TODO(hbos): Remove this when bug crbug.com/627816 is resolved (when this | |
| 54 // flag is removed). | |
| 55 command_line->AppendSwitchASCII(switches::kEnableBlinkFeatures, | |
| 56 "RTCPeerConnectionNewGetStats"); | |
| 57 } | 51 } |
| 58 | 52 |
| 59 void RunsAudioVideoWebRTCCallInTwoTabs( | 53 void RunsAudioVideoWebRTCCallInTwoTabs( |
| 60 const std::string& video_codec = WebRtcTestBase::kUseDefaultVideoCodec, | 54 const std::string& video_codec = WebRtcTestBase::kUseDefaultVideoCodec, |
| 61 const std::string& offer_cert_keygen_alg = | 55 const std::string& offer_cert_keygen_alg = |
| 62 WebRtcTestBase::kUseDefaultCertKeygen, | 56 WebRtcTestBase::kUseDefaultCertKeygen, |
| 63 const std::string& answer_cert_keygen_alg = | 57 const std::string& answer_cert_keygen_alg = |
| 64 WebRtcTestBase::kUseDefaultCertKeygen) { | 58 WebRtcTestBase::kUseDefaultCertKeygen) { |
| 65 StartServerAndOpenTabs(); | 59 StartServerAndOpenTabs(); |
| 66 | 60 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 } | 223 } |
| 230 for (const std::string& type : VerifyStatsGeneratedPromise(left_tab_)) { | 224 for (const std::string& type : VerifyStatsGeneratedPromise(left_tab_)) { |
| 231 missing_expected_stats.erase(type); | 225 missing_expected_stats.erase(type); |
| 232 } | 226 } |
| 233 for (const std::string& type : missing_expected_stats) { | 227 for (const std::string& type : missing_expected_stats) { |
| 234 EXPECT_TRUE(false) << "Expected stats dictionary is missing: " << type; | 228 EXPECT_TRUE(false) << "Expected stats dictionary is missing: " << type; |
| 235 } | 229 } |
| 236 | 230 |
| 237 DetectVideoAndHangUp(); | 231 DetectVideoAndHangUp(); |
| 238 } | 232 } |
| OLD | NEW |