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

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

Issue 5089001: Cleanup: Include browser.h -> ui/browser.h [Part 3]. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes. Created 10 years, 1 month 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) 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/extensions/extension_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
7 #include "chrome/browser/extensions/extensions_service.h" 6 #include "chrome/browser/extensions/extensions_service.h"
8 #include "chrome/browser/profile.h" 7 #include "chrome/browser/profile.h"
8 #include "chrome/browser/ui/browser.h"
9 9
10 class ExtensionManagementApiTest : public ExtensionApiTest { 10 class ExtensionManagementApiTest : public ExtensionApiTest {
11 public: 11 public:
12 virtual void InstallExtensions() { 12 virtual void InstallExtensions() {
13 FilePath basedir = test_data_dir_.AppendASCII("management"); 13 FilePath basedir = test_data_dir_.AppendASCII("management");
14 14
15 // Load 2 enabled items. 15 // Load 2 enabled items.
16 ASSERT_TRUE(LoadExtension(basedir.AppendASCII("enabled_extension"))); 16 ASSERT_TRUE(LoadExtension(basedir.AppendASCII("enabled_extension")));
17 ASSERT_TRUE(LoadExtension(basedir.AppendASCII("enabled_app"))); 17 ASSERT_TRUE(LoadExtension(basedir.AppendASCII("enabled_app")));
18 18
19 // Load 2 disabled items. 19 // Load 2 disabled items.
20 ExtensionsService* service = browser()->profile()->GetExtensionsService(); 20 ExtensionsService* service = browser()->profile()->GetExtensionsService();
21 ASSERT_TRUE(LoadExtension(basedir.AppendASCII("disabled_extension"))); 21 ASSERT_TRUE(LoadExtension(basedir.AppendASCII("disabled_extension")));
22 service->DisableExtension(last_loaded_extension_id_); 22 service->DisableExtension(last_loaded_extension_id_);
23 ASSERT_TRUE(LoadExtension(basedir.AppendASCII("disabled_app"))); 23 ASSERT_TRUE(LoadExtension(basedir.AppendASCII("disabled_app")));
24 service->DisableExtension(last_loaded_extension_id_); 24 service->DisableExtension(last_loaded_extension_id_);
25 } 25 }
26 }; 26 };
27 27
28 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, Basics) { 28 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, Basics) {
29 InstallExtensions(); 29 InstallExtensions();
30 ASSERT_TRUE(RunExtensionSubtest("management/test", "basics.html")); 30 ASSERT_TRUE(RunExtensionSubtest("management/test", "basics.html"));
31 } 31 }
32 32
33 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, Uninstall) { 33 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, Uninstall) {
34 InstallExtensions(); 34 InstallExtensions();
35 ASSERT_TRUE(RunExtensionSubtest("management/test", "uninstall.html")); 35 ASSERT_TRUE(RunExtensionSubtest("management/test", "uninstall.html"));
36 } 36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698