summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_automation.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 23:16:47 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 23:16:47 +0000
commitfe9eb4f9d93a56a26d99fba1d3d3761fd6590fb2 (patch)
treebb145bf68ee0fef814d5abfbc0ef39151465025a /chrome_frame/chrome_frame_automation.cc
parent07d05acb91a5ab60b7d5f2b71a201f4f896f43ef (diff)
downloadchromium_src-fe9eb4f9d93a56a26d99fba1d3d3761fd6590fb2.zip
chromium_src-fe9eb4f9d93a56a26d99fba1d3d3761fd6590fb2.tar.gz
chromium_src-fe9eb4f9d93a56a26d99fba1d3d3761fd6590fb2.tar.bz2
Ensure that ChromeFrame link navigations which occur when the opener frame is NULL are
always reported back to the host browser as top level navigations. The other change is to always send over navigation requests from the automation client even if the url remains the same if the client is already initialized, i.e this is treated as a new navigation. Fixes bug http://code.google.com/p/chromium/issues/detail?id=38456 Bug=38456 Test=The ChromeFrame side of the change is covered by a new chrome frame mock test. Will add a test for the render view change in a subsequent CL. Review URL: http://codereview.chromium.org/3235001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r--chrome_frame/chrome_frame_automation.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc
index 6ede7e3..aa89256 100644
--- a/chrome_frame/chrome_frame_automation.cc
+++ b/chrome_frame/chrome_frame_automation.cc
@@ -686,7 +686,11 @@ bool ChromeFrameAutomationClient::InitiateNavigation(const std::string& url,
return false;
}
- if (!chrome_launch_params_ || parsed_url != chrome_launch_params_->url()) {
+ // If we are not yet initialized ignore attempts to navigate to the same url.
+ // Navigation attempts to the same URL could occur if the automation client
+ // was reused for a new active document instance.
+ if (!chrome_launch_params_ || is_initialized() ||
+ parsed_url != chrome_launch_params_->url()) {
// Important: Since we will be using the referrer_ variable from a
// different thread, we need to force a new std::string buffer instance for
// the referrer_ GURL variable. Otherwise we can run into strangeness when