Index: chrome/browser/chromeos/extensions/virtual_keyboard_browsertest.h |
diff --git a/chrome/browser/chromeos/extensions/virtual_keyboard_browsertest.h b/chrome/browser/chromeos/extensions/virtual_keyboard_browsertest.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6a3cf036e334cab9ebe9499a1160c8b76fb60559 |
--- /dev/null |
+++ b/chrome/browser/chromeos/extensions/virtual_keyboard_browsertest.h |
@@ -0,0 +1,57 @@ |
+// 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.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_VIRTUAL_KEYBOARD_BROWSERTEST_H_ |
+#define CHROME_BROWSER_CHROMEOS_EXTENSIONS_VIRTUAL_KEYBOARD_BROWSERTEST_H_ |
+ |
+#include "chrome/test/base/in_process_browser_test.h" |
+ |
+namespace base { |
+class CommandLine; |
+class FilePath; |
+} |
+ |
+namespace content { |
+class RenderViewHost; |
+class WebContents; |
+} |
+ |
+class VirtualKeyboardBrowserTest : public InProcessBrowserTest { |
+ public: |
+ // Injects javascript in |file| into the keyboard page and runs test methods. |
+ virtual void RunTest(const base::FilePath& file); |
+ |
+ virtual void ShowVirtualKeyboard(); |
+ |
+ // Returns the extension id of the active virtual keyboard. |
+ virtual std::string GetKeyboardExtensionId(); |
+ |
+ // Returns the base test framework. |
+ virtual base::FilePath GetBaseFrameWork(); |
+ |
+ // Returns the directory the test files are in. |
+ virtual base::FilePath GetTestDir(); |
+ |
+ // Returns the render view host that the keyboard is in. |
+ virtual content::RenderViewHost* GetKeyboardRenderViewHost(); |
+ |
+ // Returns the keyboard's web contents. |
+ virtual content::WebContents* NavigateToWebContents(); |
+ |
+ virtual GURL GetURL(); |
+ |
+ // InProcessBrowserTest. |
+ // Ensure that the virtual keyboard is enabled. |
+ virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; |
+ |
+ protected: |
+ // Injects javascript into the keyboard page. The test |file| is in |
+ // directory |dir| relative to the root testing directory. |
+ void InjectJavascript(const base::FilePath& dir, const base::FilePath& file); |
+ |
+ private: |
+ std::string utf8_content_; |
+}; |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_VIRTUAL_KEYBOARD_BROWSERTEST_H_ |