summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 00:22:31 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 00:22:31 +0000
commit29d8897984da1d8948471e68c3b6514ede4f21c8 (patch)
treeedd44dc46f41fd0fe443e7a10cd063f5ce9c6977 /webkit
parent40bdb6d952d8b20846cdf0c7ee7a4cd4a930898d (diff)
downloadchromium_src-29d8897984da1d8948471e68c3b6514ede4f21c8.zip
chromium_src-29d8897984da1d8948471e68c3b6514ede4f21c8.tar.gz
chromium_src-29d8897984da1d8948471e68c3b6514ede4f21c8.tar.bz2
Fixes bug in test shell. We were invoking ResetTestController before
StopLoading. This is problematic because StopLayout may end up changing state in the layout test controller (the frozen status of the WorkQueue in this case). I've changed it to reset the status after invoking StopLoading. BUG=none TEST=none Review URL: http://codereview.chromium.org/27109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10315 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/layout_tests/test_lists/tests_fixable.txt7
-rw-r--r--webkit/tools/test_shell/test_shell_win.cc18
2 files changed, 13 insertions, 12 deletions
diff --git a/webkit/tools/layout_tests/test_lists/tests_fixable.txt b/webkit/tools/layout_tests/test_lists/tests_fixable.txt
index b332e94..d0746227 100644
--- a/webkit/tools/layout_tests/test_lists/tests_fixable.txt
+++ b/webkit/tools/layout_tests/test_lists/tests_fixable.txt
@@ -758,9 +758,8 @@ DEFER LINUX WIN : LayoutTests/editing/selection/caret-rtl-2.html = FAIL
DEFER WIN : LayoutTests/fast/dom/resource-locations-in-created-html-document.html = FAIL
DEBUG : LayoutTests/http/tests/messaging/cross-domain-message-event-dispatch.html = FAIL PASS TIMEOUT
-// This is failing occasionally because we're dumping the tree/image
-// before the redirect completes.
-LayoutTests/http/tests/navigation/metaredirect-basic.html = FAIL
+// See recent changes to test_shell_win.
+LINUX MAC : LayoutTests/http/tests/navigation/metaredirect-basic.html = FAIL
// GURL/KURL difference in handling of "http:". http://crbug.com/7386.
// New test. We should fix it, but it doesn't need to block the current release
@@ -1752,9 +1751,7 @@ MAC RELEASE : LayoutTests/fast/events/scrollbar-double-click.html = TIMEOUT
// Regressions from WebKit merge 40847-40875
LINUX WIN : LayoutTests/fast/box-shadow/basic-shadows.html = FAIL
MAC LINUX WIN : LayoutTests/fast/forms/textarea-scrolled-endline-caret.html = FAIL PASS
-WIN : LayoutTests/http/tests/navigation/javascriptlink-frames.html = FAIL
WIN : LayoutTests/http/tests/navigation/javascriptlink-subframeload.html = FAIL PASS
-WIN : LayoutTests/http/tests/navigation/metaredirect-frames.html = FAIL
WIN : LayoutTests/http/tests/navigation/metaredirect-subframeload.html = FAIL PASS
WIN : LayoutTests/http/tests/navigation/redirect302-subframeload.html = FAIL PASS
WIN : LayoutTests/http/tests/navigation/success200-frames-loadsame.html = FAIL PASS
diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
index 9968fa6..045c8b8 100644
--- a/webkit/tools/test_shell/test_shell_win.cc
+++ b/webkit/tools/test_shell/test_shell_win.cc
@@ -231,13 +231,6 @@ bool TestShell::RunFileTest(const TestParams& params) {
HWND hwnd = *(TestShell::windowList()->begin());
TestShell* shell =
static_cast<TestShell*>(win_util::GetWindowUserData(hwnd));
- shell->ResetTestController();
-
- // ResetTestController may have closed the window we were holding on to.
- // Grab the first window again.
- hwnd = *(TestShell::windowList()->begin());
- shell = static_cast<TestShell*>(win_util::GetWindowUserData(hwnd));
- DCHECK(shell);
// Clear focus between tests.
shell->m_focusedWidgetHost = NULL;
@@ -246,6 +239,17 @@ bool TestShell::RunFileTest(const TestParams& params) {
shell->webView()->StopLoading();
shell->navigation_controller()->Reset();
+ // StopLoading may update state maintained in the test controller (for
+ // example, whether the WorkQueue is frozen) as such, we need to reset it
+ // after we invoke StopLoading.
+ shell->ResetTestController();
+
+ // ResetTestController may have closed the window we were holding on to.
+ // Grab the first window again.
+ hwnd = *(TestShell::windowList()->begin());
+ shell = static_cast<TestShell*>(win_util::GetWindowUserData(hwnd));
+ DCHECK(shell);
+
// Clean up state between test runs.
webkit_glue::ResetBeforeTestRun(shell->webView());
ResetWebPreferences();