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

Unified Diff: chrome_frame/test/chrome_frame_test_utils.h

Issue 604014: First batch of context menu tests... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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_frame/test/chrome_frame_test_utils.h
===================================================================
--- chrome_frame/test/chrome_frame_test_utils.h (revision 38776)
+++ chrome_frame/test/chrome_frame_test_utils.h (working copy)
@@ -22,36 +22,14 @@
#include "base/scoped_variant_win.h"
#include "chrome_frame/test_utils.h"
+#include "chrome_frame/test/simulate_input.h"
// Include without path to make GYP build see it.
#include "chrome_tab.h" // NOLINT
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.
-// The extended flag indicates if this is an extended key
-void SendVirtualKey(int16 key, bool extended);
-
-// 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);
@@ -72,26 +50,6 @@
extern const wchar_t kSafariImageName[];
extern const wchar_t kChromeImageName[];
-// Displays the chrome frame context menu by posting mouse move messages to
-// Chrome
-void ShowChromeFrameContextMenu();
-
-// Sends keyboard messages to the chrome frame context menu to select the About
-// Chrome frame option.
-void SelectAboutChromeFrame();
-
-// Returns a handle to the chrome frame render widget child window.
-// Returns NULL on failure.
-HWND GetChromeRendererWindow();
-
-// Sends the specified input to the window passed in.
-void SendInputToWindow(HWND window, const std::string& input_string);
-
-// Helper function to set keyboard focus to a window. This is achieved by
-// sending a mouse move followed by a mouse down/mouse up combination to the
-// window.
-void SetKeyboardFocusToWindow(HWND window, int x, int y);
-
// Temporarily impersonate the current thread to low integrity for the lifetime
// of the object. Destructor will automatically revert integrity level.
class LowIntegrityToken {
@@ -192,8 +150,15 @@
// Send keyboard input to the renderer window hosted in chrome using
// SendInput API
- void SendInputToChrome(const std::string& input_string);
+ void SendKeys(const wchar_t* input_string);
+ // Send mouse click to the renderer window hosted in chrome using
+ // SendInput API
+ void SendMouseClick(int x, int y, simulate_input::MouseButton button);
+
+ void Exec(const GUID* cmd_group_guid, DWORD command_id,
+ DWORD cmd_exec_opt, VARIANT* in_args, VARIANT* out_args);
+
BEGIN_COM_MAP(WebBrowserEventSink)
END_COM_MAP()
@@ -247,7 +212,8 @@
// Chrome frame callbacks
virtual void OnLoad(const wchar_t* url) {}
virtual void OnLoadError(const wchar_t* url) {}
- virtual void OnMessage(const wchar_t* message) {}
+ virtual void OnMessage(const wchar_t* message, const wchar_t* origin,
+ const wchar_t* source) {}
IWebBrowser2* web_browser2() {
return web_browser2_.get();
@@ -256,6 +222,7 @@
virtual void OnNewBrowserWindow(IDispatch* new_window, const wchar_t* url) {}
HRESULT SetWebBrowser(IWebBrowser2* web_browser2);
+ void ExpectRendererWindowHasfocus();
protected:
STDMETHOD(OnBeforeNavigate2Internal)(IDispatch* dispatch, VARIANT* url,
@@ -278,7 +245,7 @@
void ConnectToChromeFrame();
void DisconnectFromChromeFrame();
- HWND GetTabWindow();
+ HWND GetRendererWindow();
public:
ScopedComPtr<IWebBrowser2> web_browser2_;

Powered by Google App Engine
This is Rietveld 408576698