Index: webkit/tools/test_shell/test_shell_gtk.cc |
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc |
index 8cc9214613861dc5d0d099d28c961c3e3eb200da..bcf4ec0b5eb5a1d42432ebe8a0bae49465b58358 100644 |
--- a/webkit/tools/test_shell/test_shell_gtk.cc |
+++ b/webkit/tools/test_shell/test_shell_gtk.cc |
@@ -506,13 +506,6 @@ void TestShell::ResizeSubViews() { |
GtkWindow* window = *(TestShell::windowList()->begin()); |
TestShell* shell = |
static_cast<TestShell*>(g_object_get_data(G_OBJECT(window), "test-shell")); |
- shell->ResetTestController(); |
- |
- // ResetTestController may have closed the window we were holding on to. |
- // Grab the first window again. |
- window = *(TestShell::windowList()->begin()); |
- shell = static_cast<TestShell*>(g_object_get_data(G_OBJECT(window), "test-shell")); |
- DCHECK(shell); |
// Clear focus between tests. |
shell->m_focusedWidgetHost = NULL; |
@@ -521,6 +514,18 @@ void TestShell::ResizeSubViews() { |
shell->webView()->mainFrame()->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. |
+ window = *(TestShell::windowList()->begin()); |
agl
2010/05/27 14:30:40
in CL 27109, grabbing the window again occurs befo
bulach
2010/05/27 14:42:26
ops, sorry, I should've clarified: sky addressed t
|
+ shell = static_cast<TestShell*>(g_object_get_data(G_OBJECT(window), |
+ "test-shell")); |
+ DCHECK(shell); |
+ |
// Clean up state between test runs. |
webkit_glue::ResetBeforeTestRun(shell->webView()); |
ResetWebPreferences(); |