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

Unified Diff: content/shell/webkit_test_controller.cc

Issue 11594006: [content shell] if a layout test runs notifyDone() before it has finished loading, wait for the pag… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | « content/shell/webkit_test_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/webkit_test_controller.cc
diff --git a/content/shell/webkit_test_controller.cc b/content/shell/webkit_test_controller.cc
index 858e0d968c3d33c2608ad9d89b29f43504145e79..41ffe6436af77ed2fc50dade41aedc991935f81a 100644
--- a/content/shell/webkit_test_controller.cc
+++ b/content/shell/webkit_test_controller.cc
@@ -187,6 +187,7 @@ bool WebKitTestController::ResetAfterLayoutTest() {
is_printing_ = false;
should_stay_on_page_after_handling_before_unload_ = false;
wait_until_done_ = false;
+ did_finish_load_ = false;
prefs_.reset(new ShellWebPreferences);
{
base::AutoLock lock(lock_);
@@ -296,6 +297,7 @@ void WebKitTestController::TimeoutHandler() {
}
void WebKitTestController::OnDidFinishLoad() {
+ did_finish_load_ = true;
if (wait_until_done_)
return;
CaptureDump();
@@ -369,6 +371,10 @@ void WebKitTestController::OnNotifyDone() {
if (!wait_until_done_)
return;
watchdog_.Cancel();
+ if (!did_finish_load_) {
+ wait_until_done_ = false;
+ return;
+ }
CaptureDump();
}
« no previous file with comments | « content/shell/webkit_test_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698