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/strings/stringprintf.h" | |
7 #include "build/build_config.h" | 6 #include "build/build_config.h" |
8 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" | 7 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" |
9 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h" | 8 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h" |
10 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/ui/browser_tabstrip.h" | 10 #include "chrome/browser/ui/browser_tabstrip.h" |
12 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 11 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
13 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
14 #include "chrome/test/base/in_process_browser_test.h" | 13 #include "chrome/test/base/in_process_browser_test.h" |
15 #include "chrome/test/base/ui_test_utils.h" | 14 #include "chrome/test/base/ui_test_utils.h" |
16 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 91 |
93 SetupPeerconnectionWithCertificateAndLocalStream( | 92 SetupPeerconnectionWithCertificateAndLocalStream( |
94 left_tab_, "gCertificateClone"); | 93 left_tab_, "gCertificateClone"); |
95 SetupPeerconnectionWithLocalStream(right_tab_, cert_keygen_alg); | 94 SetupPeerconnectionWithLocalStream(right_tab_, cert_keygen_alg); |
96 | 95 |
97 NegotiateCall(left_tab_, right_tab_); | 96 NegotiateCall(left_tab_, right_tab_); |
98 | 97 |
99 DetectVideoAndHangUp(); | 98 DetectVideoAndHangUp(); |
100 } | 99 } |
101 | 100 |
102 protected: | 101 protected: |
103 void StartServerAndOpenTabs() { | 102 void StartServerAndOpenTabs() { |
104 ASSERT_TRUE(embedded_test_server()->Start()); | 103 ASSERT_TRUE(embedded_test_server()->Start()); |
105 left_tab_ = OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); | 104 left_tab_ = OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); |
106 right_tab_ = OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); | 105 right_tab_ = OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); |
107 } | 106 } |
108 | 107 |
109 void DetectVideoAndHangUp() { | 108 void DetectVideoAndHangUp() { |
110 StartDetectingVideo(left_tab_, "remote-view"); | 109 StartDetectingVideo(left_tab_, "remote-view"); |
111 StartDetectingVideo(right_tab_, "remote-view"); | 110 StartDetectingVideo(right_tab_, "remote-view"); |
112 #if !defined(OS_MACOSX) | 111 #if !defined(OS_MACOSX) |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 RunsAudioVideoWebRTCCallInTwoTabsGetStatsPromise) { | 218 RunsAudioVideoWebRTCCallInTwoTabsGetStatsPromise) { |
220 StartServerAndOpenTabs(); | 219 StartServerAndOpenTabs(); |
221 SetupPeerconnectionWithLocalStream(left_tab_); | 220 SetupPeerconnectionWithLocalStream(left_tab_); |
222 SetupPeerconnectionWithLocalStream(right_tab_); | 221 SetupPeerconnectionWithLocalStream(right_tab_); |
223 NegotiateCall(left_tab_, right_tab_); | 222 NegotiateCall(left_tab_, right_tab_); |
224 | 223 |
225 VerifyStatsGeneratedPromise(left_tab_); | 224 VerifyStatsGeneratedPromise(left_tab_); |
226 | 225 |
227 DetectVideoAndHangUp(); | 226 DetectVideoAndHangUp(); |
228 } | 227 } |
OLD | NEW |