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

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

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 "base/stringprintf.h" 5 #include "base/stringprintf.h"
6 #include "chrome/browser/extensions/extension_apitest.h" 6 #include "chrome/browser/extensions/extension_apitest.h"
7 #include "chrome/browser/extensions/extension_install_dialog.h" 7 #include "chrome/browser/extensions/extension_install_dialog.h"
8 #include "chrome/browser/extensions/extension_install_ui.h" 8 #include "chrome/browser/extensions/extension_install_ui.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_webstore_private_api.h" 10 #include "chrome/browser/extensions/extension_webstore_private_api.h"
11 #include "chrome/browser/extensions/webstore_installer.h" 11 #include "chrome/browser/extensions/webstore_installer.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
14 #include "chrome/common/chrome_notification_types.h" 14 #include "chrome/common/chrome_notification_types.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "chrome/test/base/ui_test_utils.h" 16 #include "chrome/test/base/ui_test_utils.h"
17 #include "content/public/browser/notification_observer.h" 17 #include "content/public/browser/notification_observer.h"
18 #include "content/public/browser/notification_registrar.h" 18 #include "content/public/browser/notification_registrar.h"
19 #include "content/common/notification_service.h"
20 #include "net/base/mock_host_resolver.h" 19 #include "net/base/mock_host_resolver.h"
21 20
22 namespace { 21 namespace {
23 22
24 class WebstoreInstallListener : public WebstoreInstaller::Delegate { 23 class WebstoreInstallListener : public WebstoreInstaller::Delegate {
25 public: 24 public:
26 WebstoreInstallListener() 25 WebstoreInstallListener()
27 : received_failure_(false), received_success_(false), waiting_(false) {} 26 : received_failure_(false), received_success_(false), waiting_(false) {}
28 27
29 void OnExtensionInstallSuccess(const std::string& id) OVERRIDE; 28 void OnExtensionInstallSuccess(const std::string& id) OVERRIDE;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 listener.Wait(); 171 listener.Wait();
173 ASSERT_TRUE(listener.received_success()); 172 ASSERT_TRUE(listener.received_success());
174 ASSERT_EQ("iladmdjkfniedhfhcfoefgojhgaiaccc", listener.id()); 173 ASSERT_EQ("iladmdjkfniedhfhcfoefgojhgaiaccc", listener.id());
175 } 174 }
176 175
177 // Tests using the iconUrl parameter to the install function. 176 // Tests using the iconUrl parameter to the install function.
178 IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, 177 IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest,
179 IconUrl) { 178 IconUrl) {
180 ASSERT_TRUE(RunInstallTest("icon_url.html", "extension.crx")); 179 ASSERT_TRUE(RunInstallTest("icon_url.html", "extension.crx"));
181 } 180 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698