Index: chrome/test/base/v8_unit_test.cc |
diff --git a/chrome/test/base/v8_unit_test.cc b/chrome/test/base/v8_unit_test.cc |
index 9f52f061d65079b36c771527a6955027ea5fc762..392ff45bf5a454a781c2c9fa5a3588dc4a30672e 100644 |
--- a/chrome/test/base/v8_unit_test.cc |
+++ b/chrome/test/base/v8_unit_test.cc |
@@ -11,6 +11,7 @@ |
#include "base/strings/stringprintf.h" |
#include "chrome/common/chrome_paths.h" |
#include "third_party/WebKit/public/web/WebKit.h" |
+#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" |
namespace { |
@@ -95,6 +96,7 @@ bool V8UnitTest::RunJavascriptTestF(const std::string& test_fixture, |
v8::Local<v8::Context> context = |
v8::Local<v8::Context>::New(isolate, context_); |
v8::Context::Scope context_scope(context); |
+ blink::WebScopedMicrotaskSuppression microtasks_scope; |
v8::Local<v8::Value> function_property = |
context->Global()->Get(v8::String::NewFromUtf8(isolate, "runTest")); |
@@ -209,6 +211,7 @@ void V8UnitTest::ExecuteScriptInContext(const base::StringPiece& script_source, |
v8::Local<v8::Context> context = |
v8::Local<v8::Context>::New(isolate, context_); |
v8::Context::Scope context_scope(context); |
+ blink::WebScopedMicrotaskSuppression microtasks_scope; |
v8::Local<v8::String> source = |
v8::String::NewFromUtf8(isolate, |
script_source.data(), |
@@ -257,6 +260,7 @@ void V8UnitTest::TestFunction(const std::string& function_name) { |
v8::Local<v8::Context> context = |
v8::Local<v8::Context>::New(isolate, context_); |
v8::Context::Scope context_scope(context); |
+ blink::WebScopedMicrotaskSuppression microtasks_scope; |
v8::Local<v8::Value> function_property = context->Global()->Get( |
v8::String::NewFromUtf8(isolate, function_name.c_str())); |