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

Unified Diff: chrome/browser/extensions/api/image_writer_private/image_writer_private_apitest.cc

Issue 2851593002: Use ScopedTaskEnvironment instead of MessageLoopForUI in chrome tests. (Closed)
Patch Set: self-review Created 3 years, 8 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: chrome/browser/extensions/api/image_writer_private/image_writer_private_apitest.cc
diff --git a/chrome/browser/extensions/api/image_writer_private/image_writer_private_apitest.cc b/chrome/browser/extensions/api/image_writer_private/image_writer_private_apitest.cc
index 87c653dc791dfa08ced44626750d3ddc2b7ffd51..dc7769b45594f0a8b5c3eaed4e3da3d00d3077cc 100644
--- a/chrome/browser/extensions/api/image_writer_private/image_writer_private_apitest.cc
+++ b/chrome/browser/extensions/api/image_writer_private/image_writer_private_apitest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/message_loop/message_loop.h"
+#include "base/test/scoped_task_environment.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/api/file_system/file_system_api.h"
#include "chrome/browser/extensions/api/image_writer_private/operation.h"
@@ -19,6 +19,10 @@ using extensions::image_writer::FakeImageWriterClient;
class ImageWriterPrivateApiTest : public ExtensionApiTest {
public:
+ ImageWriterPrivateApiTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
+
void SetUpInProcessBrowserTestFixture() override {
ExtensionApiTest::SetUpInProcessBrowserTestFixture();
test_utils_.SetUp(true);
@@ -89,7 +93,7 @@ class ImageWriterPrivateApiTest : public ExtensionApiTest {
#endif
protected:
- base::MessageLoopForUI message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
image_writer::ImageWriterTestUtils test_utils_;
};

Powered by Google App Engine
This is Rietveld 408576698