diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-06 22:53:06 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-06 22:53:06 +0000 |
commit | 52622ca1f4b0f04dfbe1d2bc4cd27018a7c7e5b6 (patch) | |
tree | 163a805063d73947bc8bddec43262836e130cdc0 /chrome_frame/test/ie_event_sink.cc | |
parent | 174cf0c7c20edf63af4328023a56bf3c2c421c99 (diff) | |
download | chromium_src-52622ca1f4b0f04dfbe1d2bc4cd27018a7c7e5b6.zip chromium_src-52622ca1f4b0f04dfbe1d2bc4cd27018a7c7e5b6.tar.gz chromium_src-52622ca1f4b0f04dfbe1d2bc4cd27018a7c7e5b6.tar.bz2 |
Popups opened with the noreferrer parameter within ChromeFrame should open in the host browser.
This support already exists in Chrome where the renderer routes the url back to the browser
and eventually to the TabContentsDelegate.
However in ChromeFrame if the current window is a popup window then attempting to open this URL
in a tab fails on IE7 and IE8 as popups don't support this functionality. Workaround as per
msdn documentation is to reissue the navigation request with the navOpenInNewWindow flag.
Fixed a bug in the ChromeFrame tests IEEventSink::GetRendererWindow function where at times
it would fail to return the correct HWND in the window hierarchy when the page was rendered
in ChromeFrame.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=68183
BUG=68183
TEST=Covered by new ChromeFrame test.
Review URL: http://codereview.chromium.org/6002017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70676 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test/ie_event_sink.cc')
-rw-r--r-- | chrome_frame/test/ie_event_sink.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome_frame/test/ie_event_sink.cc b/chrome_frame/test/ie_event_sink.cc index 49f56f4..1649e2a 100644 --- a/chrome_frame/test/ie_event_sink.cc +++ b/chrome_frame/test/ie_event_sink.cc @@ -266,14 +266,18 @@ HWND IEEventSink::GetRendererWindow() { ole_window->GetWindow(&activex_window); EXPECT_TRUE(IsWindow(activex_window)); + wchar_t class_name[MAX_PATH] = {0}; + HWND child_window = NULL; // chrome tab window is the first (and the only) child of activex for (HWND first_child = activex_window; ::IsWindow(first_child); first_child = ::GetWindow(first_child, GW_CHILD)) { - renderer_window = first_child; + child_window = first_child; + GetClassName(child_window, class_name, arraysize(class_name)); + if (!_wcsicmp(class_name, L"Chrome_RenderWidgetHostHWND")) { + renderer_window = child_window; + break; + } } - wchar_t class_name[MAX_PATH] = {0}; - GetClassName(renderer_window, class_name, arraysize(class_name)); - EXPECT_EQ(0, _wcsicmp(class_name, L"Chrome_RenderWidgetHostHWND")); } } else { DCHECK(web_browser2_); |