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

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: Fixed nits. 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..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_

Powered by Google App Engine
This is Rietveld 408576698