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

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

Issue 12253022: Manifest handler for all keys background-related. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « chrome/browser/extensions/event_router.cc ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/extensions/extension_browsertest.h" 5 #include "chrome/browser/extensions/extension_browsertest.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 18 matching lines...) Expand all
29 #include "chrome/browser/ui/browser.h" 29 #include "chrome/browser/ui/browser.h"
30 #include "chrome/browser/ui/browser_window.h" 30 #include "chrome/browser/ui/browser_window.h"
31 #include "chrome/browser/ui/extensions/native_app_window.h" 31 #include "chrome/browser/ui/extensions/native_app_window.h"
32 #include "chrome/browser/ui/extensions/shell_window.h" 32 #include "chrome/browser/ui/extensions/shell_window.h"
33 #include "chrome/browser/ui/omnibox/location_bar.h" 33 #include "chrome/browser/ui/omnibox/location_bar.h"
34 #include "chrome/browser/ui/tabs/tab_strip_model.h" 34 #include "chrome/browser/ui/tabs/tab_strip_model.h"
35 #include "chrome/common/chrome_notification_types.h" 35 #include "chrome/common/chrome_notification_types.h"
36 #include "chrome/common/chrome_paths.h" 36 #include "chrome/common/chrome_paths.h"
37 #include "chrome/common/chrome_switches.h" 37 #include "chrome/common/chrome_switches.h"
38 #include "chrome/common/chrome_version_info.h" 38 #include "chrome/common/chrome_version_info.h"
39 #include "chrome/common/extensions/api/icons/icons_handler.h"
40 #include "chrome/common/extensions/extension_manifest_constants.h" 39 #include "chrome/common/extensions/extension_manifest_constants.h"
41 #include "chrome/common/extensions/extension_set.h" 40 #include "chrome/common/extensions/extension_set.h"
42 #include "chrome/common/extensions/manifest_handler.h" 41 #include "chrome/common/extensions/manifest_handler.h"
43 #include "chrome/test/base/ui_test_utils.h" 42 #include "chrome/test/base/ui_test_utils.h"
44 #include "content/public/browser/navigation_controller.h" 43 #include "content/public/browser/navigation_controller.h"
45 #include "content/public/browser/navigation_entry.h" 44 #include "content/public/browser/navigation_entry.h"
46 #include "content/public/browser/notification_registrar.h" 45 #include "content/public/browser/notification_registrar.h"
47 #include "content/public/browser/notification_service.h" 46 #include "content/public/browser/notification_service.h"
48 #include "content/public/browser/render_view_host.h" 47 #include "content/public/browser/render_view_host.h"
49 #include "content/public/test/browser_test_utils.h" 48 #include "content/public/test/browser_test_utils.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // ExtensionService and then the real profile with one, as we do when 104 // ExtensionService and then the real profile with one, as we do when
106 // running on chromeos. 105 // running on chromeos.
107 command_line->AppendSwitchASCII(switches::kLoginUser, 106 command_line->AppendSwitchASCII(switches::kLoginUser,
108 "TestUser@gmail.com"); 107 "TestUser@gmail.com");
109 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); 108 command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
110 #endif 109 #endif
111 } 110 }
112 111
113 void ExtensionBrowserTest::SetUpOnMainThread() { 112 void ExtensionBrowserTest::SetUpOnMainThread() {
114 InProcessBrowserTest::SetUpOnMainThread(); 113 InProcessBrowserTest::SetUpOnMainThread();
115 extensions::ManifestHandler::Register(
116 extension_manifest_keys::kIcons,
117 make_linked_ptr(new extensions::IconsHandler));
118 } 114 }
119 115
120 const Extension* ExtensionBrowserTest::LoadExtensionWithFlags( 116 const Extension* ExtensionBrowserTest::LoadExtensionWithFlags(
121 const base::FilePath& path, int flags) { 117 const base::FilePath& path, int flags) {
122 ExtensionService* service = extensions::ExtensionSystem::Get( 118 ExtensionService* service = extensions::ExtensionSystem::Get(
123 profile())->extension_service(); 119 profile())->extension_service();
124 { 120 {
125 content::NotificationRegistrar registrar; 121 content::NotificationRegistrar registrar;
126 registrar.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, 122 registrar.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
127 content::NotificationService::AllSources()); 123 content::NotificationService::AllSources());
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 case content::NOTIFICATION_LOAD_STOP: 729 case content::NOTIFICATION_LOAD_STOP:
734 VLOG(1) << "Got LOAD_STOP notification."; 730 VLOG(1) << "Got LOAD_STOP notification.";
735 MessageLoopForUI::current()->Quit(); 731 MessageLoopForUI::current()->Quit();
736 break; 732 break;
737 733
738 default: 734 default:
739 NOTREACHED(); 735 NOTREACHED();
740 break; 736 break;
741 } 737 }
742 } 738 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/event_router.cc ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698