OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/location.h" | 5 #include "base/location.h" |
6 #include "base/prefs/pref_service.h" | 6 #include "base/prefs/pref_service.h" |
7 #include "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
12 #include "chrome/browser/extensions/extension_apitest.h" | 12 #include "chrome/browser/extensions/extension_apitest.h" |
13 #include "chrome/browser/net/prediction_options.h" | 13 #include "chrome/browser/net/prediction_options.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "chrome/test/base/ui_test_utils.h" | 18 #include "chrome/test/base/ui_test_utils.h" |
19 #include "components/autofill/core/common/autofill_pref_names.h" | 19 #include "components/autofill/core/common/autofill_pref_names.h" |
20 #include "components/content_settings/core/common/pref_names.h" | 20 #include "components/content_settings/core/common/pref_names.h" |
21 #include "components/password_manager/core/common/password_manager_pref_names.h" | 21 #include "components/password_manager/core/common/password_manager_pref_names.h" |
22 #include "components/translate/core/common/translate_pref_names.h" | 22 #include "components/translate/core/common/translate_pref_names.h" |
23 #include "content/public/browser/notification_service.h" | 23 #include "content/public/browser/notification_service.h" |
| 24 #include "content/public/common/webrtc_ip_handling_policy.h" |
24 #include "extensions/browser/extension_registry.h" | 25 #include "extensions/browser/extension_registry.h" |
25 #include "extensions/browser/test_extension_registry_observer.h" | 26 #include "extensions/browser/test_extension_registry_observer.h" |
26 #include "extensions/test/extension_test_message_listener.h" | 27 #include "extensions/test/extension_test_message_listener.h" |
27 #include "extensions/test/result_catcher.h" | 28 #include "extensions/test/result_catcher.h" |
28 | 29 |
29 namespace { | 30 namespace { |
30 | 31 |
31 void ReleaseBrowserProcessModule() { | 32 void ReleaseBrowserProcessModule() { |
32 g_browser_process->ReleaseModule(); | 33 g_browser_process->ReleaseModule(); |
33 } | 34 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 prefs->SetBoolean(prefs::kEnableTranslate, false); | 121 prefs->SetBoolean(prefs::kEnableTranslate, false); |
121 prefs->SetInteger(prefs::kNetworkPredictionOptions, | 122 prefs->SetInteger(prefs::kNetworkPredictionOptions, |
122 chrome_browser_net::NETWORK_PREDICTION_NEVER); | 123 chrome_browser_net::NETWORK_PREDICTION_NEVER); |
123 prefs->SetBoolean(password_manager::prefs::kPasswordManagerSavingEnabled, | 124 prefs->SetBoolean(password_manager::prefs::kPasswordManagerSavingEnabled, |
124 false); | 125 false); |
125 prefs->SetBoolean(prefs::kSafeBrowsingEnabled, false); | 126 prefs->SetBoolean(prefs::kSafeBrowsingEnabled, false); |
126 prefs->SetBoolean(prefs::kSearchSuggestEnabled, false); | 127 prefs->SetBoolean(prefs::kSearchSuggestEnabled, false); |
127 #if defined(ENABLE_WEBRTC) | 128 #if defined(ENABLE_WEBRTC) |
128 prefs->SetBoolean(prefs::kWebRTCMultipleRoutesEnabled, false); | 129 prefs->SetBoolean(prefs::kWebRTCMultipleRoutesEnabled, false); |
129 prefs->SetBoolean(prefs::kWebRTCNonProxiedUdpEnabled, false); | 130 prefs->SetBoolean(prefs::kWebRTCNonProxiedUdpEnabled, false); |
| 131 prefs->SetString(prefs::kWebRTCIPHandlingPolicy, |
| 132 content::kWebRTCIPHandlingDefaultPublicInterfaceOnly); |
130 #endif | 133 #endif |
131 | 134 |
132 const char kExtensionPath[] = "preference/standard"; | 135 const char kExtensionPath[] = "preference/standard"; |
133 | 136 |
134 EXPECT_TRUE(RunExtensionSubtest(kExtensionPath, "test.html")) << message_; | 137 EXPECT_TRUE(RunExtensionSubtest(kExtensionPath, "test.html")) << message_; |
135 CheckPreferencesSet(); | 138 CheckPreferencesSet(); |
136 | 139 |
137 // The settings should not be reset when the extension is reloaded. | 140 // The settings should not be reset when the extension is reloaded. |
138 ReloadExtension(last_loaded_extension_id()); | 141 ReloadExtension(last_loaded_extension_id()); |
139 CheckPreferencesSet(); | 142 CheckPreferencesSet(); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 | 346 |
344 #if defined(OS_WIN) // http://crbug.com/477844 | 347 #if defined(OS_WIN) // http://crbug.com/477844 |
345 #define MAYBE_DataReductionProxy DISABLED_DataReductionProxy | 348 #define MAYBE_DataReductionProxy DISABLED_DataReductionProxy |
346 #else | 349 #else |
347 #define MAYBE_DataReductionProxy DataReductionProxy | 350 #define MAYBE_DataReductionProxy DataReductionProxy |
348 #endif | 351 #endif |
349 IN_PROC_BROWSER_TEST_F(ExtensionPreferenceApiTest, MAYBE_DataReductionProxy) { | 352 IN_PROC_BROWSER_TEST_F(ExtensionPreferenceApiTest, MAYBE_DataReductionProxy) { |
350 EXPECT_TRUE(RunExtensionTest("preference/data_reduction_proxy")) << | 353 EXPECT_TRUE(RunExtensionTest("preference/data_reduction_proxy")) << |
351 message_; | 354 message_; |
352 } | 355 } |
OLD | NEW |