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

Unified Diff: extensions/renderer/gc_callback_unittest.cc

Issue 2610473002: Use TaskScheduler instead of WorkerPool in v8_platform.cc. (Closed)
Patch Set: Blink test environment Created 3 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
Index: extensions/renderer/gc_callback_unittest.cc
diff --git a/extensions/renderer/gc_callback_unittest.cc b/extensions/renderer/gc_callback_unittest.cc
index e6dfab625ae01aa8b05b4a87f1eef3dc2ab6bcbc..2000c504b51c6b42c5c4cca63165c7710ece98de 100644
--- a/extensions/renderer/gc_callback_unittest.cc
+++ b/extensions/renderer/gc_callback_unittest.cc
@@ -7,6 +7,7 @@
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "base/test/scoped_async_task_scheduler.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
#include "extensions/common/features/feature.h"
@@ -34,8 +35,6 @@ class GCCallbackTest : public testing::Test {
GCCallbackTest() : script_context_set_(&active_extensions_) {}
protected:
- base::MessageLoop& message_loop() { return message_loop_; }
-
ScriptContextSet& script_context_set() { return script_context_set_; }
v8::Local<v8::Context> v8_context() {
@@ -72,6 +71,11 @@ class GCCallbackTest : public testing::Test {
}
base::MessageLoop message_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_;
+
ScopedWebFrame web_frame_; // (this will construct the v8::Isolate)
// ExtensionsRendererClient is a dependency of ScriptContextSet.
TestExtensionsRendererClient extensions_renderer_client_;

Powered by Google App Engine
This is Rietveld 408576698