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

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

Issue 7649006: more changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another typo Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extensions/extension_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 #include "chrome/browser/extensions/extension_service.h" 6 #include "chrome/browser/extensions/extension_service.h"
7 #include "chrome/browser/extensions/extension_web_ui.h" 7 #include "chrome/browser/extensions/extension_web_ui.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/browser/prefs/scoped_user_pref_update.h" 9 #include "chrome/browser/prefs/scoped_user_pref_update.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 ASSERT_TRUE(CheckHistoryOverridesContainsNoDupes()); 128 ASSERT_TRUE(CheckHistoryOverridesContainsNoDupes());
129 } 129 }
130 130
131 IN_PROC_BROWSER_TEST_F(ExtensionOverrideTest, ShouldCleanUpDuplicateEntries) { 131 IN_PROC_BROWSER_TEST_F(ExtensionOverrideTest, ShouldCleanUpDuplicateEntries) {
132 // Simulate several LoadExtension() calls happening over the lifetime of 132 // Simulate several LoadExtension() calls happening over the lifetime of
133 // a preferences file without corresponding UnloadExtension() calls. This is 133 // a preferences file without corresponding UnloadExtension() calls. This is
134 // the same as the above test, except for that it is testing the case where 134 // the same as the above test, except for that it is testing the case where
135 // the file already contains dupes when an extension is loaded. 135 // the file already contains dupes when an extension is loaded.
136 ListValue* list = new ListValue(); 136 ListValue* list = new ListValue();
137 for (size_t i = 0; i < 3; ++i) 137 for (size_t i = 0; i < 3; ++i)
138 list->Append(Value::CreateStringValue("http://www.google.com/")); 138 list->Append(base::StringValue::New("http://www.google.com/"));
139 139
140 { 140 {
141 DictionaryPrefUpdate update(browser()->profile()->GetPrefs(), 141 DictionaryPrefUpdate update(browser()->profile()->GetPrefs(),
142 ExtensionWebUI::kExtensionURLOverrides); 142 ExtensionWebUI::kExtensionURLOverrides);
143 update.Get()->Set("history", list); 143 update.Get()->Set("history", list);
144 } 144 }
145 145
146 ASSERT_FALSE(CheckHistoryOverridesContainsNoDupes()); 146 ASSERT_FALSE(CheckHistoryOverridesContainsNoDupes());
147 147
148 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("override/history"))); 148 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("override/history")));
(...skipping 23 matching lines...) Expand all
172 const ExtensionList *extensions = 172 const ExtensionList *extensions =
173 browser()->profile()->GetExtensionService()->extensions(); 173 browser()->profile()->GetExtensionService()->extensions();
174 UnloadExtension((*extensions->rbegin())->id()); 174 UnloadExtension((*extensions->rbegin())->id());
175 { 175 {
176 ResultCatcher catcher; 176 ResultCatcher catcher;
177 NavigateToKeyboard(); 177 NavigateToKeyboard();
178 ASSERT_TRUE(catcher.GetNextResult()); 178 ASSERT_TRUE(catcher.GetNextResult());
179 } 179 }
180 } 180 }
181 #endif 181 #endif
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_omnibox_api.cc ('k') | chrome/browser/extensions/extension_permissions_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698