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

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

Issue 6831016: Profile shouldn't own background page stuff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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/background_page_tracker.cc ('k') | chrome/browser/profiles/profile.h » ('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) 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 "base/string_util.h" 5 #include "base/string_util.h"
6 #include "chrome/browser/background_contents_service.h" 6 #include "chrome/browser/background_contents_service.h"
7 #include "chrome/browser/background_contents_service_factory.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
11 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
12 #include "chrome/common/extensions/extension.h" 13 #include "chrome/common/extensions/extension.h"
13 #include "chrome/test/ui_test_utils.h" 14 #include "chrome/test/ui_test_utils.h"
14 #include "net/base/mock_host_resolver.h" 15 #include "net/base/mock_host_resolver.h"
15 16
16 class AppBackgroundPageApiTest : public ExtensionApiTest { 17 class AppBackgroundPageApiTest : public ExtensionApiTest {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 " \"background_page\": \"http://a.com:%d/test.html\"" 118 " \"background_page\": \"http://a.com:%d/test.html\""
118 "}", 119 "}",
119 test_server()->host_port_pair().port(), 120 test_server()->host_port_pair().port(),
120 test_server()->host_port_pair().port()); 121 test_server()->host_port_pair().port());
121 122
122 FilePath app_dir; 123 FilePath app_dir;
123 ASSERT_TRUE(CreateApp(app_manifest, &app_dir)); 124 ASSERT_TRUE(CreateApp(app_manifest, &app_dir));
124 ASSERT_TRUE(LoadExtension(app_dir)); 125 ASSERT_TRUE(LoadExtension(app_dir));
125 126
126 const Extension* extension = GetSingleLoadedExtension(); 127 const Extension* extension = GetSingleLoadedExtension();
127 ASSERT_TRUE(browser()->profile()->GetBackgroundContentsService()-> 128 ASSERT_TRUE(
128 GetAppBackgroundContents(ASCIIToUTF16(extension->id()))); 129 BackgroundContentsServiceFactory::GetForProfile(browser()->profile())->
130 GetAppBackgroundContents(ASCIIToUTF16(extension->id())));
129 } 131 }
OLDNEW
« no previous file with comments | « chrome/browser/background_page_tracker.cc ('k') | chrome/browser/profiles/profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698