summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-18 18:12:43 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-18 18:12:43 +0000
commit9349ac947390eaa68979d40e04d1562716451669 (patch)
tree16b1b0492815e0c18a5aafea18acb14b34272035
parented70d1e863ff3ff0bde0bf421a4a8e62db35b7b9 (diff)
downloadchromium_src-9349ac947390eaa68979d40e04d1562716451669.zip
chromium_src-9349ac947390eaa68979d40e04d1562716451669.tar.gz
chromium_src-9349ac947390eaa68979d40e04d1562716451669.tar.bz2
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
-rw-r--r--webkit/tools/layout_tests/test_expectations.txt2
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc6
2 files changed, 5 insertions, 3 deletions
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