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

Unified Diff: chrome/browser/chromeos/extensions/virtual_keyboard_browsertest.h

Issue 247883002: Adds browser test framework for the IME keyboard, and some basic typing tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
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..d3338059d2d520a9c16cd728e198d1d484b22547
--- /dev/null
+++ b/chrome/browser/chromeos/extensions/virtual_keyboard_browsertest.h
@@ -0,0 +1,57 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// 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.
Jeffrey Yasskin 2014/04/28 23:14:50 Please make "test methods" more precise.
rsadam 2014/04/30 17:26:11 Done.
+ virtual void RunTest(const base::FilePath& file);
+
+ virtual void ShowVirtualKeyboard();
+
+ // Returns the extension id of the active virtual keyboard.
+ 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.
+
+ // 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();
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.
+
+ virtual GURL GetURL();
Jeffrey Yasskin 2014/04/28 23:14:50 Remember to comment which URL.
rsadam 2014/04/30 17:26:11 Done.
+
+ // 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
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.
+ // 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_

Powered by Google App Engine
This is Rietveld 408576698