| 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/common/channel_info.h" | 8 #include "chrome/common/channel_info.h" |
| 9 #include "components/version_info/version_info.h" | 9 #include "components/version_info/version_info.h" |
| 10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 private: | 45 private: |
| 46 DISALLOW_COPY_AND_ASSIGN(WebRtcDisableEncryptionFlagBrowserTest); | 46 DISALLOW_COPY_AND_ASSIGN(WebRtcDisableEncryptionFlagBrowserTest); |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 // Makes a call and checks that there's encryption or not in the SDP offer. | 49 // Makes a call and checks that there's encryption or not in the SDP offer. |
| 50 IN_PROC_BROWSER_TEST_F(WebRtcDisableEncryptionFlagBrowserTest, | 50 IN_PROC_BROWSER_TEST_F(WebRtcDisableEncryptionFlagBrowserTest, |
| 51 VerifyEncryption) { | 51 VerifyEncryption) { |
| 52 if (!OnWinXp()) | 52 if (!OnWinXp()) |
| 53 return; // Flaky timeout on a webrtc Win XP bot. http://crbug.com/368163. | 53 return; // Flaky timeout on a webrtc Win XP bot. http://crbug.com/368163. |
| 54 | 54 |
| 55 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 55 ASSERT_TRUE(embedded_test_server()->Start()); |
| 56 | 56 |
| 57 content::WebContents* left_tab = | 57 content::WebContents* left_tab = |
| 58 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); | 58 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); |
| 59 content::WebContents* right_tab = | 59 content::WebContents* right_tab = |
| 60 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); | 60 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); |
| 61 | 61 |
| 62 SetupPeerconnectionWithLocalStream(left_tab); | 62 SetupPeerconnectionWithLocalStream(left_tab); |
| 63 SetupPeerconnectionWithLocalStream(right_tab); | 63 SetupPeerconnectionWithLocalStream(right_tab); |
| 64 | 64 |
| 65 NegotiateCall(left_tab, right_tab); | 65 NegotiateCall(left_tab, right_tab); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 84 | 84 |
| 85 std::string expected_string = should_detect_encryption ? | 85 std::string expected_string = should_detect_encryption ? |
| 86 "crypto-seen" : "no-crypto-seen"; | 86 "crypto-seen" : "no-crypto-seen"; |
| 87 | 87 |
| 88 ASSERT_EQ(expected_string, | 88 ASSERT_EQ(expected_string, |
| 89 ExecuteJavascript("hasSeenCryptoInSdp()", left_tab)); | 89 ExecuteJavascript("hasSeenCryptoInSdp()", left_tab)); |
| 90 | 90 |
| 91 HangUp(left_tab); | 91 HangUp(left_tab); |
| 92 HangUp(right_tab); | 92 HangUp(right_tab); |
| 93 } | 93 } |
| OLD | NEW |