summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-22 01:01:32 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-22 01:01:32 +0000
commitd0ed50d2803d910f8e2b9f5451ee1f80c0d340ed (patch)
treee042e400647fc33f20f95318a74f7e136665fb08 /chrome/test/automation
parentfe7f3aa2e93a5d6634a2d81c29ac0f71e46c54db (diff)
downloadchromium_src-d0ed50d2803d910f8e2b9f5451ee1f80c0d340ed.zip
chromium_src-d0ed50d2803d910f8e2b9f5451ee1f80c0d340ed.tar.gz
chromium_src-d0ed50d2803d910f8e2b9f5451ee1f80c0d340ed.tar.bz2
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
Diffstat (limited to 'chrome/test/automation')
-rw-r--r--chrome/test/automation/automation_proxy_uitest.cc10
1 files changed, 1 insertions, 9 deletions
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) {
"<a href='http://foo.com/' target='_blank'>Link</a>";
mock_->ServeHTMLData(1, main_url, main_html);
- GURL foo_url("http://foo.com/");
- std::string foo_html = "<!DOCTYPE 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();