| 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/renderer/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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 prefs->SetBoolean(prefs::kEnableHyperlinkAuditing, false); | 119 prefs->SetBoolean(prefs::kEnableHyperlinkAuditing, false); |
| 119 prefs->SetBoolean(prefs::kEnableReferrers, false); | 120 prefs->SetBoolean(prefs::kEnableReferrers, false); |
| 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->SetString(prefs::kWebRTCIPHandlingPolicy, |
| 129 prefs->SetBoolean(prefs::kWebRTCNonProxiedUdpEnabled, false); | 130 content::kWebRTCIPHandlingDefaultPublicInterfaceOnly); |
| 130 #endif | 131 #endif |
| 131 | 132 |
| 132 const char kExtensionPath[] = "preference/standard"; | 133 const char kExtensionPath[] = "preference/standard"; |
| 133 | 134 |
| 134 EXPECT_TRUE(RunExtensionSubtest(kExtensionPath, "test.html")) << message_; | 135 EXPECT_TRUE(RunExtensionSubtest(kExtensionPath, "test.html")) << message_; |
| 135 CheckPreferencesSet(); | 136 CheckPreferencesSet(); |
| 136 | 137 |
| 137 // The settings should not be reset when the extension is reloaded. | 138 // The settings should not be reset when the extension is reloaded. |
| 138 ReloadExtension(last_loaded_extension_id()); | 139 ReloadExtension(last_loaded_extension_id()); |
| 139 CheckPreferencesSet(); | 140 CheckPreferencesSet(); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 344 |
| 344 #if defined(OS_WIN) // http://crbug.com/477844 | 345 #if defined(OS_WIN) // http://crbug.com/477844 |
| 345 #define MAYBE_DataReductionProxy DISABLED_DataReductionProxy | 346 #define MAYBE_DataReductionProxy DISABLED_DataReductionProxy |
| 346 #else | 347 #else |
| 347 #define MAYBE_DataReductionProxy DataReductionProxy | 348 #define MAYBE_DataReductionProxy DataReductionProxy |
| 348 #endif | 349 #endif |
| 349 IN_PROC_BROWSER_TEST_F(ExtensionPreferenceApiTest, MAYBE_DataReductionProxy) { | 350 IN_PROC_BROWSER_TEST_F(ExtensionPreferenceApiTest, MAYBE_DataReductionProxy) { |
| 350 EXPECT_TRUE(RunExtensionTest("preference/data_reduction_proxy")) << | 351 EXPECT_TRUE(RunExtensionTest("preference/data_reduction_proxy")) << |
| 351 message_; | 352 message_; |
| 352 } | 353 } |
| OLD | NEW |