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

Unified Diff: content/test/ppapi_unittest.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 | « content/test/blink_test_environment.cc ('k') | content/test/ppapi_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/ppapi_unittest.h
diff --git a/content/test/ppapi_unittest.h b/content/test/ppapi_unittest.h
index 4085f7322e4950d95aef1b0d7d4e570586db1daa..688440210954fa346370a379760dfe20089f6f8a 100644
--- a/content/test/ppapi_unittest.h
+++ b/content/test/ppapi_unittest.h
@@ -5,16 +5,11 @@
#ifndef CONTENT_TEST_PPAPI_UNITTEST_H_
#define CONTENT_TEST_PPAPI_UNITTEST_H_
-#include <memory>
-
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/test/scoped_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace base {
-class MessageLoop;
-}
-
namespace content {
class PepperPluginInstanceImpl;
@@ -42,12 +37,13 @@ class PpapiUnittest : public testing::Test {
void SetViewSize(int width, int height) const;
private:
- // Note: module must be declared first since we want it to get destroyed last.
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
+
+ // Note: module must be declared right after |scoped_task_environment_| since
+ // we want it to get destroyed just before |scoped_task_environment_|.
scoped_refptr<PluginModule> module_;
scoped_refptr<PepperPluginInstanceImpl> instance_;
- std::unique_ptr<base::MessageLoop> message_loop_;
-
DISALLOW_COPY_AND_ASSIGN(PpapiUnittest);
};
« no previous file with comments | « content/test/blink_test_environment.cc ('k') | content/test/ppapi_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698