Index: mojo/edk/js/tests/js_to_cpp_tests.cc |
diff --git a/mojo/edk/js/tests/js_to_cpp_tests.cc b/mojo/edk/js/tests/js_to_cpp_tests.cc |
index e5e6bd1dbf156454cdeb87dd1b1a752b02aac93b..8896953dcfe0ba1e7b0277e43de5e591a2d1e2ec 100644 |
--- a/mojo/edk/js/tests/js_to_cpp_tests.cc |
+++ b/mojo/edk/js/tests/js_to_cpp_tests.cc |
@@ -15,6 +15,7 @@ |
#include "base/message_loop/message_loop.h" |
#include "base/run_loop.h" |
#include "base/strings/utf_string_conversions.h" |
+#include "base/test/scoped_async_task_scheduler.h" |
#include "base/threading/thread_task_runner_handle.h" |
#include "gin/array_buffer.h" |
#include "gin/public/isolate_holder.h" |
@@ -418,6 +419,10 @@ class JsToCppTest : public testing::Test { |
base::MessageLoop loop; |
base::RunLoop run_loop_; |
+ // Required by gin::V8Platform::CallOnBackgroundThread(). Can't be a |
+ // ScopedTaskScheduler because v8 synchronously waits for tasks to run. |
+ base::test::ScopedAsyncTaskScheduler scoped_async_task_scheduler; |
+ |
DISALLOW_COPY_AND_ASSIGN(JsToCppTest); |
}; |