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

Unified Diff: chrome_frame/test/chrome_frame_test_utils.h

Issue 218019: Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 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
« no previous file with comments | « chrome_frame/test/chrome_frame_automation_mock.cc ('k') | chrome_frame/test/chrome_frame_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/chrome_frame_test_utils.h
===================================================================
--- chrome_frame/test/chrome_frame_test_utils.h (revision 0)
+++ chrome_frame/test/chrome_frame_test_utils.h (revision 0)
@@ -0,0 +1,61 @@
+// Copyright (c) 2009 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_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_
+#define CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_
+
+#include <windows.h>
+
+#include "base/basictypes.h"
+#include "base/process_util.h"
+
+namespace chrome_frame_test {
+
+bool IsTopLevelWindow(HWND window);
+int CloseVisibleWindowsOnAllThreads(HANDLE process);
+bool ForceSetForegroundWindow(HWND window);
+bool EnsureProcessInForeground(base::ProcessId process_id);
+
+// Iterates through all the characters in the string and simulates
+// keyboard input. The input goes to the currently active application.
+bool SendString(const wchar_t* s);
+
+// Sends a virtual key such as VK_TAB, VK_RETURN or a character that has been
+// translated to a virtual key.
+void SendVirtualKey(int16 key);
+
+// Translates a single char to a virtual key and calls SendVirtualKey.
+void SendChar(char c);
+
+// Sends an ascii string, char by char (calls SendChar for each).
+void SendString(const char* s);
+
+// Sends a keystroke to the currently active application with optional
+// modifiers set.
+bool SendMnemonic(WORD mnemonic_char, bool shift_pressed, bool control_pressed,
+ bool alt_pressed);
+
+base::ProcessHandle LaunchFirefox(const std::wstring& url);
+base::ProcessHandle LaunchOpera(const std::wstring& url);
+base::ProcessHandle LaunchIE(const std::wstring& url);
+base::ProcessHandle LaunchSafari(const std::wstring& url);
+base::ProcessHandle LaunchChrome(const std::wstring& url);
+
+// Attempts to close all open IE windows.
+// The return value is the number of windows closed.
+// @note: this function requires COM to be initialized on the calling thread.
+// Since the caller might be running in either MTA or STA, the function does
+// not perform this initialization itself.
+int CloseAllIEWindows();
+
+extern const wchar_t kIEImageName[];
+extern const wchar_t kIEBrokerImageName[];
+extern const wchar_t kFirefoxImageName[];
+extern const wchar_t kOperaImageName[];
+extern const wchar_t kSafariImageName[];
+extern const wchar_t kChromeImageName[];
+
+} // namespace chrome_frame_test
+
+#endif // CHROME_FRAME_CHROMETAB_UNITTESTS_CF_TEST_UTILS_H_
« no previous file with comments | « chrome_frame/test/chrome_frame_automation_mock.cc ('k') | chrome_frame/test/chrome_frame_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698