Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: chrome/browser/prefs/pref_functional_browsertest.cc

Issue 1252973002: Remove the migration code from content_settings::DefaultProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <string> 5 #include <string>
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/download/download_prefs.h" 8 #include "chrome/browser/download/download_prefs.h"
9 #include "chrome/browser/prefs/pref_service_syncable.h" 9 #include "chrome/browser/prefs/pref_service_syncable.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 " window.domAutomationController.send(true);" 80 " window.domAutomationController.send(true);"
81 " }" 81 " }"
82 "}" 82 "}"
83 "window.domAutomationController.send(false);"; 83 "window.domAutomationController.send(false);";
84 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( 84 EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
85 browser()->tab_strip_model()->GetActiveWebContents(), 85 browser()->tab_strip_model()->GetActiveWebContents(),
86 script, 86 script,
87 &result)); 87 &result));
88 EXPECT_TRUE(result); 88 EXPECT_TRUE(result);
89 89
90 base::DictionaryValue value; 90 browser()->profile()->GetPrefs()->SetInteger(
91 value.SetInteger("images", 2); 91 prefs::kDefaultImagesSetting, CONTENT_SETTING_BLOCK);
92 browser()->profile()->GetPrefs()->Set(prefs::kDefaultContentSettings,
93 value);
94 92
95 ui_test_utils::NavigateToURL( 93 ui_test_utils::NavigateToURL(
96 browser(), 94 browser(),
97 test_server()->GetURL("files/settings/image_page.html")); 95 test_server()->GetURL("files/settings/image_page.html"));
98 96
99 result = false; 97 result = false;
100 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( 98 EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
101 browser()->tab_strip_model()->GetActiveWebContents(), 99 browser()->tab_strip_model()->GetActiveWebContents(),
102 script, 100 script,
103 &result)); 101 &result));
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 EXPECT_FALSE(prefs->GetBoolean(prefs::kSafeBrowsingEnabled)); 219 EXPECT_FALSE(prefs->GetBoolean(prefs::kSafeBrowsingEnabled));
222 EXPECT_FALSE(prefs->GetBoolean(prefs::kAlternateErrorPagesEnabled)); 220 EXPECT_FALSE(prefs->GetBoolean(prefs::kAlternateErrorPagesEnabled));
223 EXPECT_FALSE(prefs->GetBoolean(prefs::kSearchSuggestEnabled)); 221 EXPECT_FALSE(prefs->GetBoolean(prefs::kSearchSuggestEnabled));
224 } 222 }
225 223
226 // Verify that we have some Local State prefs. 224 // Verify that we have some Local State prefs.
227 IN_PROC_BROWSER_TEST_F(PrefsFunctionalTest, TestHaveLocalStatePrefs) { 225 IN_PROC_BROWSER_TEST_F(PrefsFunctionalTest, TestHaveLocalStatePrefs) {
228 EXPECT_TRUE(g_browser_process->local_state()->GetPreferenceValues().get()); 226 EXPECT_TRUE(g_browser_process->local_state()->GetPreferenceValues().get());
229 } 227 }
230 228
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698