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

Side by Side Diff: chrome/browser/extensions/extension_override_apitest.cc

Issue 3203008: Move prefs-related files under chrome/browser/ into a prefs/ subdir. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser.h" 5 #include "chrome/browser/browser.h"
6 #include "chrome/browser/browser_list.h" 6 #include "chrome/browser/browser_list.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_dom_ui.h" 8 #include "chrome/browser/extensions/extension_dom_ui.h"
9 #include "chrome/browser/extensions/extensions_service.h" 9 #include "chrome/browser/extensions/extensions_service.h"
10 #include "chrome/browser/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
11 #include "chrome/browser/profile.h" 11 #include "chrome/browser/profile.h"
12 #include "chrome/browser/tab_contents/tab_contents.h" 12 #include "chrome/browser/tab_contents/tab_contents.h"
13 #include "chrome/common/url_constants.h" 13 #include "chrome/common/url_constants.h"
14 #include "chrome/test/ui_test_utils.h" 14 #include "chrome/test/ui_test_utils.h"
15 15
16 class ExtensionOverrideTest : public ExtensionApiTest { 16 class ExtensionOverrideTest : public ExtensionApiTest {
17 protected: 17 protected:
18 bool CheckHistoryOverridesContainsNoDupes() { 18 bool CheckHistoryOverridesContainsNoDupes() {
19 // There should be no duplicate entries in the preferences. 19 // There should be no duplicate entries in the preferences.
20 const DictionaryValue* overrides = 20 const DictionaryValue* overrides =
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 browser()->profile()->GetPrefs()->GetMutableDictionary( 122 browser()->profile()->GetPrefs()->GetMutableDictionary(
123 ExtensionDOMUI::kExtensionURLOverrides)->Set("history", list); 123 ExtensionDOMUI::kExtensionURLOverrides)->Set("history", list);
124 124
125 ASSERT_FALSE(CheckHistoryOverridesContainsNoDupes()); 125 ASSERT_FALSE(CheckHistoryOverridesContainsNoDupes());
126 126
127 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("override/history"))); 127 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("override/history")));
128 128
129 ASSERT_TRUE(CheckHistoryOverridesContainsNoDupes()); 129 ASSERT_TRUE(CheckHistoryOverridesContainsNoDupes());
130 } 130 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698