OLD | NEW |
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_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.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/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "chrome/browser/chrome_notification_types.h" | 12 #include "chrome/browser/chrome_notification_types.h" |
13 #include "chrome/browser/chromeos/extensions/input_method_event_router.h" | 13 #include "chrome/browser/chromeos/extensions/input_method_event_router.h" |
14 #include "chrome/browser/extensions/api/test/test_api.h" | 14 #include "chrome/browser/extensions/api/test/test_api.h" |
15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 16 #include "chromeos/ime/extension_ime_util.h" |
16 #include "chromeos/ime/input_method_manager.h" | 17 #include "chromeos/ime/input_method_manager.h" |
17 #include "content/public/browser/notification_observer.h" | 18 #include "content/public/browser/notification_observer.h" |
18 #include "content/public/browser/notification_registrar.h" | 19 #include "content/public/browser/notification_registrar.h" |
19 #include "content/public/browser/notification_service.h" | 20 #include "content/public/browser/notification_service.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
21 | 22 |
22 namespace { | 23 namespace { |
23 | 24 |
24 const char kLoginScreenUILanguage[] = "fr"; | 25 const char kLoginScreenUILanguage[] = "fr"; |
25 const char kInitialInputMethodOnLoginScreen[] = "xkb:us::eng"; | 26 const char kInitialInputMethodOnLoginScreen[] = "xkb:us::eng"; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 75 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
75 ExtensionApiTest::SetUpCommandLine(command_line); | 76 ExtensionApiTest::SetUpCommandLine(command_line); |
76 command_line->AppendSwitchASCII( | 77 command_line->AppendSwitchASCII( |
77 switches::kWhitelistedExtensionID, "ilanclmaeigfpnmdlgelmhkpkegdioip"); | 78 switches::kWhitelistedExtensionID, "ilanclmaeigfpnmdlgelmhkpkegdioip"); |
78 } | 79 } |
79 }; | 80 }; |
80 | 81 |
81 } // namespace | 82 } // namespace |
82 | 83 |
83 IN_PROC_BROWSER_TEST_F(ExtensionInputMethodApiTest, Basic) { | 84 IN_PROC_BROWSER_TEST_F(ExtensionInputMethodApiTest, Basic) { |
| 85 chromeos::extension_ime_util::ScopedUseExtensionKeyboardFlagForTesting |
| 86 scoped_flag(false); |
| 87 |
84 // Two test, two calls. See JS code for more info. | 88 // Two test, two calls. See JS code for more info. |
85 SetInputMethodListener listener(2); | 89 SetInputMethodListener listener(2); |
86 | 90 |
87 ASSERT_TRUE(RunExtensionTest("input_method")) << message_; | 91 ASSERT_TRUE(RunExtensionTest("input_method")) << message_; |
88 } | 92 } |
OLD | NEW |