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/chrome_version_info.h" | 8 #include "chrome/common/chrome_version_info.h" |
9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
10 #include "media/base/media_switches.h" | 10 #include "media/base/media_switches.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // likely good to have the test anyway, even though a failure might not be | 24 // likely good to have the test anyway, even though a failure might not be |
25 // detected until a branch has been promoted to another channel. The unit | 25 // detected until a branch has been promoted to another channel. The unit |
26 // test for ChromeContentBrowserClient::MaybeCopyDisableWebRtcEncryptionSwitch | 26 // test for ChromeContentBrowserClient::MaybeCopyDisableWebRtcEncryptionSwitch |
27 // tests for all channels however. | 27 // tests for all channels however. |
28 // TODO(grunell): Test the different channel cases for any build. | 28 // TODO(grunell): Test the different channel cases for any build. |
29 class WebRtcDisableEncryptionFlagBrowserTest : public WebRtcTestBase { | 29 class WebRtcDisableEncryptionFlagBrowserTest : public WebRtcTestBase { |
30 public: | 30 public: |
31 WebRtcDisableEncryptionFlagBrowserTest() {} | 31 WebRtcDisableEncryptionFlagBrowserTest() {} |
32 virtual ~WebRtcDisableEncryptionFlagBrowserTest() {} | 32 virtual ~WebRtcDisableEncryptionFlagBrowserTest() {} |
33 | 33 |
34 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 34 virtual void SetUpInProcessBrowserTestFixture() override { |
35 DetectErrorsInJavaScript(); // Look for errors in our rather complex js. | 35 DetectErrorsInJavaScript(); // Look for errors in our rather complex js. |
36 } | 36 } |
37 | 37 |
38 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 38 virtual void SetUpCommandLine(CommandLine* command_line) override { |
39 // This test should run with fake devices. | 39 // This test should run with fake devices. |
40 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); | 40 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); |
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 }; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 std::string expected_string = should_detect_encryption ? | 86 std::string expected_string = should_detect_encryption ? |
87 "crypto-seen" : "no-crypto-seen"; | 87 "crypto-seen" : "no-crypto-seen"; |
88 | 88 |
89 ASSERT_EQ(expected_string, | 89 ASSERT_EQ(expected_string, |
90 ExecuteJavascript("hasSeenCryptoInSdp()", left_tab)); | 90 ExecuteJavascript("hasSeenCryptoInSdp()", left_tab)); |
91 | 91 |
92 HangUp(left_tab); | 92 HangUp(left_tab); |
93 HangUp(right_tab); | 93 HangUp(right_tab); |
94 } | 94 } |
OLD | NEW |