summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-10 23:34:16 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-10 23:34:16 +0000
commit43e2256528de1ddc42e0d60587c1f09ffedc9d45 (patch)
treef582c93ea5f31cf08ed6fee2ff02f53fa2885d08
parent61bb70de5b746df2e7f274f0b8f6deee3eea3c5f (diff)
downloadchromium_src-43e2256528de1ddc42e0d60587c1f09ffedc9d45.zip
chromium_src-43e2256528de1ddc42e0d60587c1f09ffedc9d45.tar.gz
chromium_src-43e2256528de1ddc42e0d60587c1f09ffedc9d45.tar.bz2
Attempt to fix failing tests on the chrome frame builder.
The function to set keyboard focus to the chrome renderer window in a chrome frame instance was sending the mouse click to the ancestor window, which is not correct. The ancestor window is only needed to bring the whole hierarchy to the foreground. Review URL: http://codereview.chromium.org/491026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34304 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome_frame/test/chrome_frame_test_utils.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc
index 9f2a6de..f1ef010 100644
--- a/chrome_frame/test/chrome_frame_test_utils.cc
+++ b/chrome_frame/test/chrome_frame_test_utils.cc
@@ -441,10 +441,11 @@ void ShowChromeFrameContextMenu() {
}
void SetKeyboardFocusToWindow(HWND window, int x, int y) {
- if (!IsTopLevelWindow(window)) {
- window = GetAncestor(window, GA_ROOT);
+ HWND top_level_window = window;
+ if (!IsTopLevelWindow(top_level_window)) {
+ top_level_window = GetAncestor(window, GA_ROOT);
}
- ForceSetForegroundWindow(window);
+ ForceSetForegroundWindow(top_level_window);
POINT cursor_position = {130, 130};
ClientToScreen(window, &cursor_position);