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

Unified Diff: content/shell/layout_test_controller_host.cc

Issue 10825419: [content shell] add --no-timeout option (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | content/shell/shell_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/layout_test_controller_host.cc
diff --git a/content/shell/layout_test_controller_host.cc b/content/shell/layout_test_controller_host.cc
index 88ab1769568ef884c12b44ebcc4cf84f379d9f3e..92a912ffc847fa3f2196924c998e027739fb9d81 100644
--- a/content/shell/layout_test_controller_host.cc
+++ b/content/shell/layout_test_controller_host.cc
@@ -4,9 +4,11 @@
#include "content/shell/layout_test_controller_host.h"
+#include "base/command_line.h"
#include "base/message_loop.h"
#include "content/public/browser/render_view_host.h"
#include "content/shell/shell_messages.h"
+#include "content/shell/shell_switches.h"
#include "webkit/support/webkit_support_gfx.h"
namespace content {
@@ -184,12 +186,14 @@ void LayoutTestControllerHost::OnDumpChildFramesAsText() {
void LayoutTestControllerHost::OnWaitUntilDone() {
if (wait_until_done_)
return;
- watchdog_.Reset(base::Bind(&LayoutTestControllerHost::TimeoutHandler,
- base::Unretained(this)));
- MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- watchdog_.callback(),
- base::TimeDelta::FromMilliseconds(kTestTimeoutMilliseconds));
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTimeout)) {
+ watchdog_.Reset(base::Bind(&LayoutTestControllerHost::TimeoutHandler,
+ base::Unretained(this)));
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ watchdog_.callback(),
+ base::TimeDelta::FromMilliseconds(kTestTimeoutMilliseconds));
+ }
wait_until_done_ = true;
}
« no previous file with comments | « no previous file | content/shell/shell_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698