From 9349ac947390eaa68979d40e04d1562716451669 Mon Sep 17 00:00:00 2001 From: "darin@chromium.org" Date: Mon, 18 May 2009 18:12:43 +0000 Subject: Fix test_shell so that we can pass LayoutTests/http/tests/navigation/relativeanchor-basic.html If a navigation only consisted of scrolling to an anchor, then we would skip the normal 'done' processing. As a result, we would not update the 'content state' of the NavigationEntry. The code that dumps the back/forward list inspects the navigation entries, and it would see a blank content state for the last entry. BUG=11924 R=dglazkov Review URL: http://codereview.chromium.org/113530 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16300 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/tools/layout_tests/test_expectations.txt | 2 -- webkit/tools/test_shell/test_webview_delegate.cc | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'webkit') diff --git a/webkit/tools/layout_tests/test_expectations.txt b/webkit/tools/layout_tests/test_expectations.txt index b0fbaa0..39999e4 100644 --- a/webkit/tools/layout_tests/test_expectations.txt +++ b/webkit/tools/layout_tests/test_expectations.txt @@ -2650,8 +2650,6 @@ BUG11909 : LayoutTests/http/tests/security/aboutBlank/security-context-grandchil BUG11909 : LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html = FAIL BUG11909 : LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html = FAIL -BUG11924 WIN : LayoutTests/http/tests/navigation/relativeanchor-basic.html = FAIL - // Need LINUX/Mac rebaselines after WebKit Update 437150:43770 BUG12054 MAC LINUX : LayoutTests/fast/canvas/canvas-bg-zoom.html = FAIL BUG12054 MAC LINUX : LayoutTests/editing/execCommand/outdent-blockquote-test1.html = FAIL diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index 9b7a328..c2f1956 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -392,6 +392,8 @@ void TestWebViewDelegate::DidChangeLocationWithinPageForFrame( } UpdateForCommittedLoad(frame, is_new_navigation); + + LocationChangeDone(frame); } void TestWebViewDelegate::DidReceiveIconForFrame(WebView* webview, @@ -791,7 +793,9 @@ void TestWebViewDelegate::UpdateAddressBar(WebView* webView) { } void TestWebViewDelegate::LocationChangeDone(WebFrame* frame) { - if (frame == top_loading_frame_) { + // A navigation to an URL with a reference fragment might just be a command + // to scroll the page. In such cases, there will be no top loading frame. + if (frame == top_loading_frame_ || !top_loading_frame_) { top_loading_frame_ = NULL; // It is important to update the content state for the current navigation -- cgit v1.1