From d0ed50d2803d910f8e2b9f5451ee1f80c0d340ed Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Tue, 22 Jun 2010 01:01:32 +0000 Subject: In pages rendered in ChromeFrame window open requests or link clicks with target blank which target a different origin should initiate the navigation in the host browser. We achieve this by performing an origin check on the opener frame and the URL being opened. If the origins don't match we allow the host browser to handle this navigation. There is still one issue here as a popup window creation request is still initiated and sent out to the host browser which initiates a dummy attach external tab navigation. Subsequently while applying policy the OpenURL IPC is sent out to the host browser which initiates the navigation to the expected URL. This causes a dummy attach external tab entry to be created in the host browser's history which would have to be deleted. Fixes bug http://code.google.com/p/chromium/issues/detail?id=46667 Bug=46667 Test=Covered by new chrome frame unit test. Review URL: http://codereview.chromium.org/2855017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50416 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/automation/automation_proxy_uitest.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'chrome/test/automation') diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index cf037ed..1629147 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -1281,10 +1281,6 @@ TEST_F(ExternalTabUITestPopupEnabled, UserGestureTargetBlank) { "Link"; mock_->ServeHTMLData(1, main_url, main_html); - GURL foo_url("http://foo.com/"); - std::string foo_html = "Foo lives here"; - mock_->ServeHTMLData(2, foo_url, foo_html); - HWND foo_host = CreateWindowW(L"Button", L"foo_host", WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, NULL); @@ -1296,15 +1292,11 @@ TEST_F(ExternalTabUITestPopupEnabled, UserGestureTargetBlank) { EXPECT_CALL(*mock_, OnAttachExternalTab(1, _)) .Times(1) - .WillOnce(testing::WithArgs<1>(testing::Invoke(CreateFunctor(mock_, - &ExternalTabUITestMockClient::ConnectToExternalTab, foo_host)))); - - EXPECT_CALL(*mock_, OnLoad(2, _)).WillOnce(QUIT_LOOP_SOON(&loop, 500)); + .WillOnce(QUIT_LOOP_SOON(&loop, 500)); mock_->CreateTabWithUrl(main_url); loop.RunFor(action_max_timeout_ms()); - EXPECT_CALL(*mock_, HandleClosed(2)); EXPECT_CALL(*mock_, HandleClosed(1)); ::DestroyWindow(foo_host); mock_->DestroyHostWindow(); -- cgit v1.1