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 "base/win/windows_version.h" | 6 #include "base/win/windows_version.h" |
7 #include "chrome/browser/media/webrtc_browsertest_base.h" | 7 #include "chrome/browser/media/webrtc_browsertest_base.h" |
8 #include "chrome/browser/media/webrtc_browsertest_common.h" | 8 #include "chrome/browser/media/webrtc_browsertest_common.h" |
9 #include "chrome/common/chrome_version_info.h" | 9 #include "chrome/common/chrome_version_info.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 // Disable encryption with the command line flag. | 42 // Disable encryption with the command line flag. |
43 command_line->AppendSwitch(switches::kDisableWebRtcEncryption); | 43 command_line->AppendSwitch(switches::kDisableWebRtcEncryption); |
44 } | 44 } |
45 | 45 |
46 private: | 46 private: |
47 DISALLOW_COPY_AND_ASSIGN(WebRtcDisableEncryptionFlagBrowserTest); | 47 DISALLOW_COPY_AND_ASSIGN(WebRtcDisableEncryptionFlagBrowserTest); |
48 }; | 48 }; |
49 | 49 |
50 // Makes a call and checks that there's encryption or not in the SDP offer. | 50 // Makes a call and checks that there's encryption or not in the SDP offer. |
51 // TODO(phoglund): this is unreliable on non-webrtc bots because its peer | |
52 // connection server could clash with other tests running in parallel, | |
53 // therefore only running manually. http://crbug.com/358207. | |
54 IN_PROC_BROWSER_TEST_F(WebRtcDisableEncryptionFlagBrowserTest, | 51 IN_PROC_BROWSER_TEST_F(WebRtcDisableEncryptionFlagBrowserTest, |
55 MANUAL_VerifyEncryption) { | 52 VerifyEncryption) { |
56 // Flaky timeout on a webrtc Win XP bot. http://crbug.com/368163. | 53 // Flaky timeout on a webrtc Win XP bot. http://crbug.com/368163. |
57 #if defined (OS_WIN) | 54 #if defined (OS_WIN) |
58 if (base::win::GetVersion() < base::win::VERSION_VISTA) | 55 if (base::win::GetVersion() < base::win::VERSION_VISTA) |
59 return; | 56 return; |
60 #endif | 57 #endif |
61 | 58 |
62 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 59 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
63 | 60 |
64 content::WebContents* left_tab = | 61 content::WebContents* left_tab = |
65 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); | 62 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); |
(...skipping 24 matching lines...) Expand all Loading... |
90 #endif | 87 #endif |
91 | 88 |
92 std::string expected_string = should_detect_encryption ? | 89 std::string expected_string = should_detect_encryption ? |
93 "crypto-seen" : "no-crypto-seen"; | 90 "crypto-seen" : "no-crypto-seen"; |
94 | 91 |
95 ASSERT_EQ(expected_string, | 92 ASSERT_EQ(expected_string, |
96 ExecuteJavascript("hasSeenCryptoInSdp()", left_tab)); | 93 ExecuteJavascript("hasSeenCryptoInSdp()", left_tab)); |
97 | 94 |
98 HangUp(left_tab); | 95 HangUp(left_tab); |
99 } | 96 } |
OLD | NEW |