| 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/prefs/pref_service.h" | 5 #include "base/prefs/pref_service.h" |
| 6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
| 10 #include "chrome/browser/net/prediction_options.h" | 10 #include "chrome/browser/net/prediction_options.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 prefs->SetBoolean(prefs::kBlockThirdPartyCookies, true); | 111 prefs->SetBoolean(prefs::kBlockThirdPartyCookies, true); |
| 112 prefs->SetBoolean(prefs::kEnableHyperlinkAuditing, false); | 112 prefs->SetBoolean(prefs::kEnableHyperlinkAuditing, false); |
| 113 prefs->SetBoolean(prefs::kEnableReferrers, false); | 113 prefs->SetBoolean(prefs::kEnableReferrers, false); |
| 114 prefs->SetBoolean(prefs::kEnableTranslate, false); | 114 prefs->SetBoolean(prefs::kEnableTranslate, false); |
| 115 prefs->SetInteger(prefs::kNetworkPredictionOptions, | 115 prefs->SetInteger(prefs::kNetworkPredictionOptions, |
| 116 chrome_browser_net::NETWORK_PREDICTION_NEVER); | 116 chrome_browser_net::NETWORK_PREDICTION_NEVER); |
| 117 prefs->SetBoolean(password_manager::prefs::kPasswordManagerSavingEnabled, | 117 prefs->SetBoolean(password_manager::prefs::kPasswordManagerSavingEnabled, |
| 118 false); | 118 false); |
| 119 prefs->SetBoolean(prefs::kSafeBrowsingEnabled, false); | 119 prefs->SetBoolean(prefs::kSafeBrowsingEnabled, false); |
| 120 prefs->SetBoolean(prefs::kSearchSuggestEnabled, false); | 120 prefs->SetBoolean(prefs::kSearchSuggestEnabled, false); |
| 121 #if defined(ENABLE_WEBRTC) |
| 122 prefs->SetBoolean(prefs::kWebRTCMultipleRoutesEnabled, false); |
| 123 #endif |
| 121 | 124 |
| 122 const char kExtensionPath[] = "preference/standard"; | 125 const char kExtensionPath[] = "preference/standard"; |
| 123 | 126 |
| 124 EXPECT_TRUE(RunExtensionSubtest(kExtensionPath, "test.html")) << message_; | 127 EXPECT_TRUE(RunExtensionSubtest(kExtensionPath, "test.html")) << message_; |
| 125 CheckPreferencesSet(); | 128 CheckPreferencesSet(); |
| 126 | 129 |
| 127 // The settings should not be reset when the extension is reloaded. | 130 // The settings should not be reset when the extension is reloaded. |
| 128 ReloadExtension(last_loaded_extension_id()); | 131 ReloadExtension(last_loaded_extension_id()); |
| 129 CheckPreferencesSet(); | 132 CheckPreferencesSet(); |
| 130 | 133 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 listener_incognito10.Reply("ok"); | 331 listener_incognito10.Reply("ok"); |
| 329 | 332 |
| 330 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 333 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 331 EXPECT_TRUE(catcher_incognito.GetNextResult()) << catcher.message(); | 334 EXPECT_TRUE(catcher_incognito.GetNextResult()) << catcher.message(); |
| 332 } | 335 } |
| 333 | 336 |
| 334 IN_PROC_BROWSER_TEST_F(ExtensionPreferenceApiTest, DataReductionProxy) { | 337 IN_PROC_BROWSER_TEST_F(ExtensionPreferenceApiTest, DataReductionProxy) { |
| 335 EXPECT_TRUE(RunExtensionTest("preference/data_reduction_proxy")) << | 338 EXPECT_TRUE(RunExtensionTest("preference/data_reduction_proxy")) << |
| 336 message_; | 339 message_; |
| 337 } | 340 } |
| OLD | NEW |