| OLD | NEW |
| 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" | |
| 6 #include "chrome/browser/browser_list.h" | 5 #include "chrome/browser/browser_list.h" |
| 7 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
| 8 #include "chrome/browser/extensions/extension_dom_ui.h" | 7 #include "chrome/browser/extensions/extension_dom_ui.h" |
| 9 #include "chrome/browser/extensions/extensions_service.h" | 8 #include "chrome/browser/extensions/extensions_service.h" |
| 10 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
| 11 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profile.h" |
| 12 #include "chrome/browser/tab_contents/tab_contents.h" | 11 #include "chrome/browser/tab_contents/tab_contents.h" |
| 12 #include "chrome/browser/ui/browser.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 = |
| 21 browser()->profile()->GetPrefs()->GetDictionary( | 21 browser()->profile()->GetPrefs()->GetDictionary( |
| 22 ExtensionDOMUI::kExtensionURLOverrides); | 22 ExtensionDOMUI::kExtensionURLOverrides); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 const ExtensionList *extensions = | 163 const ExtensionList *extensions = |
| 164 browser()->profile()->GetExtensionsService()->extensions(); | 164 browser()->profile()->GetExtensionsService()->extensions(); |
| 165 UnloadExtension((*extensions->rbegin())->id()); | 165 UnloadExtension((*extensions->rbegin())->id()); |
| 166 { | 166 { |
| 167 ResultCatcher catcher; | 167 ResultCatcher catcher; |
| 168 NavigateToKeyboard(); | 168 NavigateToKeyboard(); |
| 169 ASSERT_TRUE(catcher.GetNextResult()); | 169 ASSERT_TRUE(catcher.GetNextResult()); |
| 170 } | 170 } |
| 171 } | 171 } |
| 172 #endif | 172 #endif |
| OLD | NEW |