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

Unified Diff: chrome/test/base/v8_unit_test.h

Issue 2852373004: Use ScopedTaskEnvironment instead of MessageLoop in tests that use v8. (Closed)
Patch Set: Reset-RenderViewTest Created 3 years, 7 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 | « no previous file | chrome/test/base/v8_unit_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/v8_unit_test.h
diff --git a/chrome/test/base/v8_unit_test.h b/chrome/test/base/v8_unit_test.h
index 2184973937f93d3fcdd5bd6d97b94ee0d0380d6e..c4080763c228aab128c45c5e22b341cbc95c3230 100644
--- a/chrome/test/base/v8_unit_test.h
+++ b/chrome/test/base/v8_unit_test.h
@@ -10,13 +10,10 @@
#include "base/files/file_path.h"
#include "base/strings/string_piece.h"
+#include "base/test/scoped_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "v8/include/v8.h"
-namespace base {
-class MessageLoop;
-} // namespace base
-
// A superclass for unit tests that involve running JavaScript. This class
// sets up V8 context and has methods that make it easy to execute scripts in
// this context as well as call functions in the context.
@@ -78,6 +75,8 @@ class V8UnitTest : public testing::Test {
// Initializes paths and libraries.
void InitPathsAndLibraries();
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
+
// Handle scope that is used throughout the life of this class.
v8::HandleScope handle_scope_;
@@ -86,8 +85,6 @@ class V8UnitTest : public testing::Test {
// User added libraries.
std::vector<base::FilePath> user_libraries_;
-
- std::unique_ptr<base::MessageLoop> loop_;
};
#endif // CHROME_TEST_BASE_V8_UNIT_TEST_H_
« no previous file with comments | « no previous file | chrome/test/base/v8_unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698