Commit a58db8b0 authored by ananta@chromium.org's avatar ananta@chromium.org

Fix the ChromeFrame ReferrerTest failures. This test fails because we incorrectly send over

top level navigations twice for the same render view. 

Fix is to reset the page_id counters once we route the top level navigations to the
host browser.

TBR=amit

Review URL: http://codereview.chromium.org/3192012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57133 0039d316-1c4b-4281-b951-d872f2087c98
parent 38a0e3c7
...@@ -2545,6 +2545,11 @@ WebNavigationPolicy RenderView::decidePolicyForNavigation( ...@@ -2545,6 +2545,11 @@ WebNavigationPolicy RenderView::decidePolicyForNavigation(
if (renderer_preferences_.browser_handles_top_level_requests && if (renderer_preferences_.browser_handles_top_level_requests &&
IsNonLocalTopLevelNavigation(url, frame, type)) { IsNonLocalTopLevelNavigation(url, frame, type)) {
GURL referrer(request.httpHeaderField(WebString::fromUTF8("Referer"))); GURL referrer(request.httpHeaderField(WebString::fromUTF8("Referer")));
// Reset these counters as the RenderView could be reused for the next
// navigation.
page_id_ = -1;
next_page_id_ = 1;
last_page_id_sent_to_browser_ = -1;
OpenURL(url, referrer, default_policy); OpenURL(url, referrer, default_policy);
return WebKit::WebNavigationPolicyIgnore; // Suppress the load here. return WebKit::WebNavigationPolicyIgnore; // Suppress the load here.
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment