Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(911)

Unified Diff: webkit/tools/test_shell/test_shell_gtk.cc

Issue 2279002: test_shell_gtk: applies the same change as test_shell_win from http://codereview.chromium.org/27109 (Closed)
Patch Set: Patch Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698