OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
kevers
2014/04/23 13:39:05
Nit: remove (c) and update year.
rsadam
2014/04/23 14:28:53
Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_VIRTUAL_KEYBOARD_BROWSERTEST_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_VIRTUAL_KEYBOARD_BROWSERTEST_H_ | |
7 | |
8 #include "chrome/test/base/in_process_browser_test.h" | |
9 | |
10 namespace base { | |
11 class CommandLine; | |
12 class FilePath; | |
13 } | |
14 | |
15 namespace content { | |
16 class RenderViewHost; | |
17 class WebContents; | |
18 } | |
19 | |
20 class VirtualKeyboardBrowserTest : public InProcessBrowserTest { | |
21 public: | |
22 // Injects javascript in |file| into the keyboard page and runs test methods. | |
23 virtual void RunTest(const base::FilePath& file); | |
24 | |
25 virtual void ShowVirtualKeyboard(); | |
26 | |
27 // Returns the extension id of the active virtual keyboard. | |
28 virtual std::string GetKeyboardExtensionId(); | |
29 | |
30 // Returns the base test framework. | |
31 virtual base::FilePath GetBaseFrameWork(); | |
32 | |
33 // Returns the directory the test files are in. | |
34 virtual base::FilePath GetTestDir(); | |
35 | |
36 // Returns the render view host that the keyboard is in. | |
37 virtual content::RenderViewHost* GetKeyboardRenderViewHost(); | |
38 | |
39 // Returns the keyboard's web contents. | |
40 virtual content::WebContents* NavigateToWebContents(); | |
41 | |
42 virtual GURL GetURL(); | |
43 | |
44 // InProcessBrowserTest. | |
45 // Ensure that the virtual keyboard is enabled. | |
46 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; | |
47 | |
48 protected: | |
49 // Injects javascript into the keyboard page. The test |file| is in | |
50 // directory |dir| relative to the root testing directory. | |
51 void InjectJavascript(const base::FilePath& dir, const base::FilePath& file); | |
52 | |
53 private: | |
54 std::string utf8_content_; | |
55 }; | |
56 | |
57 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_VIRTUAL_KEYBOARD_BROWSERTEST_H_ | |
OLD | NEW |