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

Unified Diff: content/shell/webkit_test_controller.cc

Issue 16074003: [content shell] don't open new windows after printing the test results (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: content/shell/webkit_test_controller.cc
diff --git a/content/shell/webkit_test_controller.cc b/content/shell/webkit_test_controller.cc
index a07c83e62260edb7cab5d181a57b0fb8c00cbd72..cdc341265afe481ffe73b0db2003233661a92f84 100644
--- a/content/shell/webkit_test_controller.cc
+++ b/content/shell/webkit_test_controller.cc
@@ -264,6 +264,7 @@ bool WebKitTestController::ResetAfterLayoutTest() {
printer_->PrintImageFooter();
send_configuration_to_next_host_ = false;
is_running_test_ = false;
+ is_cleaning_up_ = false;
is_compositing_test_ = false;
enable_pixel_dumping_ = false;
expected_pixel_hash_.clear();
@@ -299,6 +300,9 @@ void WebKitTestController::OverrideWebkitPrefs(WebPreferences* prefs) {
}
void WebKitTestController::OpenURL(const GURL& url) {
+ if (is_cleaning_up_)
+ return;
+
Shell::CreateNewWindow(main_window_->web_contents()->GetBrowserContext(),
url,
main_window_->web_contents()->GetSiteInstance(),
@@ -457,6 +461,7 @@ void WebKitTestController::SendTestConfiguration() {
void WebKitTestController::OnTestFinished(bool did_timeout) {
watchdog_.Cancel();
+ is_cleaning_up_ = true;
if (did_timeout) {
printer_->AddErrorMessage(
"FAIL: Timed out waiting for notifyDone to be called");
« content/shell/webkit_test_controller.h ('K') | « content/shell/webkit_test_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698