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

Unified Diff: extensions/renderer/gc_callback_unittest.cc

Issue 2610473002: Use TaskScheduler instead of WorkerPool in v8_platform.cc. (Closed)
Patch Set: rebase Created 3 years, 10 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 | « extensions/renderer/api_binding_test.h ('k') | extensions/renderer/module_system_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e79a9274e8b42d979f74f3915d80c3d1ddbf50ec 100644
--- a/extensions/renderer/gc_callback_unittest.cc
+++ b/extensions/renderer/gc_callback_unittest.cc
@@ -2,15 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "extensions/renderer/gc_callback.h"
#include "base/bind.h"
#include "base/macros.h"
#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"
-#include "extensions/renderer/gc_callback.h"
#include "extensions/renderer/scoped_web_frame.h"
#include "extensions/renderer/script_context.h"
#include "extensions/renderer/script_context_set.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_;
« no previous file with comments | « extensions/renderer/api_binding_test.h ('k') | extensions/renderer/module_system_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698