diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-08 23:34:16 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-08 23:34:16 +0000 |
commit | 21fa3a157739a857f1882072179f1bd3d978c368 (patch) | |
tree | 731cee107cd53590baf4f6f97e273d5378e03e7e /chrome/test | |
parent | 6df403010254c73428c83e553654ce5dafa7dc00 (diff) | |
download | chromium_src-21fa3a157739a857f1882072179f1bd3d978c368.zip chromium_src-21fa3a157739a857f1882072179f1bd3d978c368.tar.gz chromium_src-21fa3a157739a857f1882072179f1bd3d978c368.tar.bz2 |
ipc: Simplify the magic required to create IPC message headers.This gets rid of having to include the files in a magic place because of xcode dependency issues, and just makes it simpler to create new IPC message classes. It also gets rid of including the X_messages_internal.h file multiple times, which simplifies things and should make the build a little faster.
In a future change, I will remove the "internal.h" files since they're no longer needed.
Review URL: http://codereview.chromium.org/5526008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68664 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/automation/tab_proxy.cc | 14 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.h | 8 | ||||
-rw-r--r-- | chrome/test/interactive_ui/npapi_interactive_test.cc | 52 |
3 files changed, 18 insertions, 56 deletions
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index fd2afaa..fdce639 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -229,20 +229,6 @@ bool TabProxy::NavigateToURLAsyncWithDisposition( return status; } -#if defined(OS_WIN) -// TODO(port): Get rid of HWND. -bool TabProxy::GetHWND(HWND* hwnd) const { - if (!is_valid()) - return false; - if (!hwnd) { - NOTREACHED(); - return false; - } - - return sender_->Send(new AutomationMsg_TabHWND(0, handle_, hwnd)); -} -#endif // defined(OS_WIN) - bool TabProxy::GetProcessID(int* process_id) const { if (!is_valid()) return false; diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h index 452a2ca..9470131 100644 --- a/chrome/test/automation/tab_proxy.h +++ b/chrome/test/automation/tab_proxy.h @@ -197,14 +197,6 @@ class TabProxy : public AutomationResourceProxy, // the last tab. bool Close(bool wait_until_closed) WARN_UNUSED_RESULT; -#if defined(OS_WIN) - // TODO(port): Use portable replacement for HWND. - - // Gets the HWND that corresponds to the content area of this tab. - // Returns true if the call was successful. - bool GetHWND(HWND* hwnd) const WARN_UNUSED_RESULT; -#endif // defined(OS_WIN) - // Gets the process ID that corresponds to the content area of this tab. // Returns true if the call was successful. If the specified tab has no // separate process for rendering its content, the return value is true but diff --git a/chrome/test/interactive_ui/npapi_interactive_test.cc b/chrome/test/interactive_ui/npapi_interactive_test.cc index 5c7ddbc..c6e40b2 100644 --- a/chrome/test/interactive_ui/npapi_interactive_test.cc +++ b/chrome/test/interactive_ui/npapi_interactive_test.cc @@ -34,7 +34,6 @@ #include "app/keyboard_codes.h" #include "base/file_path.h" #include "chrome/browser/net/url_request_mock_http_job.h" -#include "chrome/test/automation/tab_proxy.h" #include "chrome/test/automation/window_proxy.h" #include "chrome/test/ui/npapi_test_helper.h" #include "chrome/test/ui_test_utils.h" @@ -46,39 +45,24 @@ static const FilePath::CharType* kTestDir = FILE_PATH_LITERAL("npapi"); // Tests if a plugin executing a self deleting script in the context of // a synchronous mousemove works correctly TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInvokeInSynchronousMouseMove) { - if (!UITest::in_process_renderer()) { - scoped_refptr<TabProxy> tab_proxy(GetActiveTab()); - HWND tab_window = NULL; - tab_proxy->GetHWND(&tab_window); - - EXPECT_TRUE(IsWindow(tab_window)); - - show_window_ = true; - const FilePath kTestDir(FILE_PATH_LITERAL("npapi")); - const FilePath test_case( - FILE_PATH_LITERAL("execute_script_delete_in_mouse_move.html")); - GURL url = ui_test_utils::GetTestUrl(kTestDir, test_case); - NavigateToURL(url); - - POINT cursor_position = {130, 130}; - ClientToScreen(tab_window, &cursor_position); - - double screen_width = ::GetSystemMetrics(SM_CXSCREEN) - 1; - double screen_height = ::GetSystemMetrics(SM_CYSCREEN) - 1; - double location_x = cursor_position.x * (65535.0f / screen_width); - double location_y = cursor_position.y * (65535.0f / screen_height); - - INPUT input_info = {0}; - input_info.type = INPUT_MOUSE; - input_info.mi.dwFlags = MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE; - input_info.mi.dx = static_cast<long>(location_x); - input_info.mi.dy = static_cast<long>(location_y); - ::SendInput(1, &input_info, sizeof(INPUT)); - - WaitForFinish("execute_script_delete_in_mouse_move", "1", url, - kTestCompleteCookie, kTestCompleteSuccess, - action_max_timeout_ms()); - } + if (UITest::in_process_renderer()) + return; + + show_window_ = true; + const FilePath kTestDir(FILE_PATH_LITERAL("npapi")); + const FilePath test_case( + FILE_PATH_LITERAL("execute_script_delete_in_mouse_move.html")); + GURL url = ui_test_utils::GetTestUrl(kTestDir, test_case); + NavigateToURL(url); + + scoped_refptr<WindowProxy> window(automation()->GetActiveWindow()); + + gfx::Point cursor_position(150, 250); + window->SimulateOSMouseMove(cursor_position); + + WaitForFinish("execute_script_delete_in_mouse_move", "1", url, + kTestCompleteCookie, kTestCompleteSuccess, + action_max_timeout_ms()); } // Flaky, http://crbug.com/60071. |