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

Unified Diff: gin/test/file_runner.cc

Issue 129633005: Introduce a monotonic_clock module for Mojo.js. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blech Created 6 years, 11 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 | « gin/test/file_runner.h ('k') | mojo/apps/js/bindings/monotonic_clock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/test/file_runner.cc
diff --git a/gin/test/file_runner.cc b/gin/test/file_runner.cc
index 48da198afd09797e1e05e5bc1f017d86c13538fb..7b9127368d6591675eb5de8a195b4d6cb6dc38bd 100644
--- a/gin/test/file_runner.cc
+++ b/gin/test/file_runner.cc
@@ -44,7 +44,8 @@ void FileRunnerDelegate::UnhandledException(Runner* runner,
FAIL() << try_catch.GetStackTrace();
}
-void RunTestFromFile(const base::FilePath& path, FileRunnerDelegate* delegate) {
+void RunTestFromFile(const base::FilePath& path, FileRunnerDelegate* delegate,
+ bool run_until_idle) {
ASSERT_TRUE(base::PathExists(path)) << path.LossyDisplayName();
std::string source;
ASSERT_TRUE(ReadFileToString(path, &source));
@@ -58,7 +59,11 @@ void RunTestFromFile(const base::FilePath& path, FileRunnerDelegate* delegate) {
v8::V8::SetCaptureStackTraceForUncaughtExceptions(true);
runner.Run(source, path.AsUTF8Unsafe());
- message_loop.RunUntilIdle();
+ if (run_until_idle) {
+ message_loop.RunUntilIdle();
+ } else {
+ message_loop.Run();
+ }
v8::Handle<v8::Value> result = runner.context()->Global()->Get(
StringToSymbol(runner.isolate(), "result"));
« no previous file with comments | « gin/test/file_runner.h ('k') | mojo/apps/js/bindings/monotonic_clock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698