Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 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. | |
|
Jeffrey Yasskin
2014/04/28 23:14:50
Please make "test methods" more precise.
rsadam
2014/04/30 17:26:11
Done.
| |
| 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(); | |
|
Jeffrey Yasskin
2014/04/28 23:14:50
For things that you expect to be static values, it
rsadam
2014/04/30 17:26:11
Done.
| |
| 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(); | |
|
Jeffrey Yasskin
2014/04/28 23:14:50
This isn't named well since you're navigating to a
rsadam
2014/04/30 17:26:11
Done.
| |
| 41 | |
| 42 virtual GURL GetURL(); | |
|
Jeffrey Yasskin
2014/04/28 23:14:50
Remember to comment which URL.
rsadam
2014/04/30 17:26:11
Done.
| |
| 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 | |
|
Jeffrey Yasskin
2014/04/28 23:14:50
The implementation of this looks like it just accu
rsadam
2014/04/30 17:26:11
Done.
| |
| 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 |