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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "chrome/browser/search_engines/template_url_service_factory.h" | 9 #include "chrome/browser/search_engines/template_url_service_factory.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 typedef testing::Test ChromeContentBrowserClientTest; | 26 typedef testing::Test ChromeContentBrowserClientTest; |
27 | 27 |
28 TEST_F(ChromeContentBrowserClientTest, ShouldAssignSiteForURL) { | 28 TEST_F(ChromeContentBrowserClientTest, ShouldAssignSiteForURL) { |
29 ChromeContentBrowserClient client; | 29 ChromeContentBrowserClient client; |
30 EXPECT_FALSE(client.ShouldAssignSiteForURL(GURL("chrome-native://test"))); | 30 EXPECT_FALSE(client.ShouldAssignSiteForURL(GURL("chrome-native://test"))); |
31 EXPECT_TRUE(client.ShouldAssignSiteForURL(GURL("http://www.google.com"))); | 31 EXPECT_TRUE(client.ShouldAssignSiteForURL(GURL("http://www.google.com"))); |
32 EXPECT_TRUE(client.ShouldAssignSiteForURL(GURL("https://www.google.com"))); | 32 EXPECT_TRUE(client.ShouldAssignSiteForURL(GURL("https://www.google.com"))); |
33 } | 33 } |
34 | 34 |
| 35 #if defined(ENABLE_WEBRTC) |
| 36 |
35 // NOTE: Any updates to the expectations in these tests should also be done in | 37 // NOTE: Any updates to the expectations in these tests should also be done in |
36 // the browser test WebRtcDisableEncryptionFlagBrowserTest. | 38 // the browser test WebRtcDisableEncryptionFlagBrowserTest. |
37 class DisableWebRtcEncryptionFlagTest : public testing::Test { | 39 class DisableWebRtcEncryptionFlagTest : public testing::Test { |
38 public: | 40 public: |
39 DisableWebRtcEncryptionFlagTest() | 41 DisableWebRtcEncryptionFlagTest() |
40 : from_command_line_(base::CommandLine::NO_PROGRAM), | 42 : from_command_line_(base::CommandLine::NO_PROGRAM), |
41 to_command_line_(base::CommandLine::NO_PROGRAM) {} | 43 to_command_line_(base::CommandLine::NO_PROGRAM) {} |
42 | 44 |
43 protected: | 45 protected: |
44 void SetUp() override { | 46 void SetUp() override { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 #else | 82 #else |
81 EXPECT_FALSE(to_command_line_.HasSwitch(switches::kDisableWebRtcEncryption)); | 83 EXPECT_FALSE(to_command_line_.HasSwitch(switches::kDisableWebRtcEncryption)); |
82 #endif | 84 #endif |
83 } | 85 } |
84 | 86 |
85 TEST_F(DisableWebRtcEncryptionFlagTest, StableChannel) { | 87 TEST_F(DisableWebRtcEncryptionFlagTest, StableChannel) { |
86 MaybeCopyDisableWebRtcEncryptionSwitch(VersionInfo::CHANNEL_STABLE); | 88 MaybeCopyDisableWebRtcEncryptionSwitch(VersionInfo::CHANNEL_STABLE); |
87 EXPECT_FALSE(to_command_line_.HasSwitch(switches::kDisableWebRtcEncryption)); | 89 EXPECT_FALSE(to_command_line_.HasSwitch(switches::kDisableWebRtcEncryption)); |
88 } | 90 } |
89 | 91 |
| 92 #endif // ENABLE_WEBRTC |
| 93 |
90 } // namespace chrome | 94 } // namespace chrome |
91 | 95 |
92 #if !defined(OS_IOS) && !defined(OS_ANDROID) | 96 #if !defined(OS_IOS) && !defined(OS_ANDROID) |
93 namespace content { | 97 namespace content { |
94 | 98 |
95 class InstantNTPURLRewriteTest : public BrowserWithTestWindowTest { | 99 class InstantNTPURLRewriteTest : public BrowserWithTestWindowTest { |
96 protected: | 100 protected: |
97 void SetUp() override { | 101 void SetUp() override { |
98 BrowserWithTestWindowTest::SetUp(); | 102 BrowserWithTestWindowTest::SetUp(); |
99 field_trial_list_.reset(new base::FieldTrialList( | 103 field_trial_list_.reset(new base::FieldTrialList( |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 199 |
196 #if defined(OS_ANDROID) | 200 #if defined(OS_ANDROID) |
197 SetPermission(CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, | 201 SetPermission(CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, |
198 CONTENT_SETTING_ALLOW); | 202 CONTENT_SETTING_ALLOW); |
199 CheckPermissionStatus(PERMISSION_PROTECTED_MEDIA_IDENTIFIER, | 203 CheckPermissionStatus(PERMISSION_PROTECTED_MEDIA_IDENTIFIER, |
200 PERMISSION_STATUS_GRANTED); | 204 PERMISSION_STATUS_GRANTED); |
201 #endif | 205 #endif |
202 } | 206 } |
203 | 207 |
204 } // namespace chrome | 208 } // namespace chrome |
OLD | NEW |