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

Side by Side Diff: chrome/browser/chromeos/extensions/input_view_browsertest.cc

Issue 349073004: Cleanup: Remove deprecated Profile::GetExtensionService(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 6 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/shell.h" 5 #include "ash/shell.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "chrome/browser/chromeos/extensions/virtual_keyboard_browsertest.h" 7 #include "chrome/browser/chromeos/extensions/virtual_keyboard_browsertest.h"
8 #include "chrome/browser/extensions/crx_installer.h" 8 #include "chrome/browser/extensions/crx_installer.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_test_notification_observer.h" 10 #include "chrome/browser/extensions/extension_test_notification_observer.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/test/base/ui_test_utils.h" 13 #include "chrome/test/base/ui_test_utils.h"
14 #include "chromeos/ime/extension_ime_util.h" 14 #include "chromeos/ime/extension_ime_util.h"
15 #include "chromeos/ime/input_method_manager.h" 15 #include "chromeos/ime/input_method_manager.h"
16 #include "content/public/browser/render_view_host.h" 16 #include "content/public/browser/render_view_host.h"
17 #include "content/public/browser/site_instance.h" 17 #include "content/public/browser/site_instance.h"
18 #include "content/public/browser/web_contents.h" 18 #include "content/public/browser/web_contents.h"
19 #include "content/public/common/url_constants.h" 19 #include "content/public/common/url_constants.h"
20 #include "content/public/test/browser_test_utils.h" 20 #include "content/public/test/browser_test_utils.h"
21 #include "extensions/browser/extension_system.h"
21 #include "extensions/common/constants.h" 22 #include "extensions/common/constants.h"
22 #include "extensions/common/extension.h" 23 #include "extensions/common/extension.h"
23 #include "extensions/common/file_util.h" 24 #include "extensions/common/file_util.h"
24 #include "ui/aura/client/aura_constants.h" 25 #include "ui/aura/client/aura_constants.h"
25 #include "ui/base/ime/input_method.h" 26 #include "ui/base/ime/input_method.h"
26 27
27 namespace { 28 namespace {
28 29
29 const base::FilePath::CharType kExtensionName[] = "GoogleKeyboardInput-xkb.crx"; 30 const base::FilePath::CharType kExtensionName[] = "GoogleKeyboardInput-xkb.crx";
30 31
(...skipping 17 matching lines...) Expand all
48 49
49 } // namespace 50 } // namespace
50 51
51 class InputViewBrowserTest : public VirtualKeyboardBrowserTest { 52 class InputViewBrowserTest : public VirtualKeyboardBrowserTest {
52 public: 53 public:
53 // Installs the IME Extension keyboard |kExtensionName|. 54 // Installs the IME Extension keyboard |kExtensionName|.
54 std::string InstallIMEExtension() { 55 std::string InstallIMEExtension() {
55 // Loads extension. 56 // Loads extension.
56 base::FilePath path = ui_test_utils::GetTestFilePath( 57 base::FilePath path = ui_test_utils::GetTestFilePath(
57 base::FilePath(kInputViewTestDir), base::FilePath(kExtensionName)); 58 base::FilePath(kInputViewTestDir), base::FilePath(kExtensionName));
58 ExtensionService* service = browser()->profile()->GetExtensionService(); 59 ExtensionService* service = extensions::ExtensionSystem::Get(
60 browser()->profile())->extension_service();
59 scoped_refptr<extensions::CrxInstaller> installer = 61 scoped_refptr<extensions::CrxInstaller> installer =
60 extensions::CrxInstaller::CreateSilent(service); 62 extensions::CrxInstaller::CreateSilent(service);
61 63
62 ExtensionTestNotificationObserver observer(browser()); 64 ExtensionTestNotificationObserver observer(browser());
63 observer.Watch(chrome::NOTIFICATION_CRX_INSTALLER_DONE, 65 observer.Watch(chrome::NOTIFICATION_CRX_INSTALLER_DONE,
64 content::Source<extensions::CrxInstaller>(installer.get())); 66 content::Source<extensions::CrxInstaller>(installer.get()));
65 installer->set_allow_silent_install(true); 67 installer->set_allow_silent_install(true);
66 installer->set_creation_flags(extensions::Extension::FROM_WEBSTORE); 68 installer->set_creation_flags(extensions::Extension::FROM_WEBSTORE);
67 installer->InstallCrx(path); 69 installer->InstallCrx(path);
68 // Wait for CRX to be installed. 70 // Wait for CRX to be installed.
(...skipping 30 matching lines...) Expand all
99 } 101 }
100 102
101 // Disabled for leaking memory: http://crbug.com/380537 103 // Disabled for leaking memory: http://crbug.com/380537
102 IN_PROC_BROWSER_TEST_F(InputViewBrowserTest, 104 IN_PROC_BROWSER_TEST_F(InputViewBrowserTest,
103 DISABLED_CompactKeysetTransitionTest) { 105 DISABLED_CompactKeysetTransitionTest) {
104 std::string id = InstallIMEExtension(); 106 std::string id = InstallIMEExtension();
105 ASSERT_FALSE(id.empty()); 107 ASSERT_FALSE(id.empty());
106 RunTest(base::FilePath("keyset_transition_test.js"), 108 RunTest(base::FilePath("keyset_transition_test.js"),
107 InputViewConfig(id, kCompactLayout)); 109 InputViewConfig(id, kCompactLayout));
108 } 110 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc ('k') | chrome/browser/chromeos/file_manager/file_tasks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698