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

Unified Diff: content/browser/compositor/software_output_device_ozone_unittest.cc

Issue 2860703002: Use TaskScheduler instead of WorkerPool in x11_hotplug_event_handler.cc. (Closed)
Patch Set: Add ScopedTaskEnvironment in SoftwareOutputDeviceOzoneTest 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 | ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/software_output_device_ozone_unittest.cc
diff --git a/content/browser/compositor/software_output_device_ozone_unittest.cc b/content/browser/compositor/software_output_device_ozone_unittest.cc
index 703b68b8d1d4d39ebd57e27a29f950f8a9a65600..4a099e07a2f886bbd0ae650e2560357b12bac911 100644
--- a/content/browser/compositor/software_output_device_ozone_unittest.cc
+++ b/content/browser/compositor/software_output_device_ozone_unittest.cc
@@ -7,7 +7,7 @@
#include <memory>
#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
+#include "base/test/scoped_task_environment.h"
#include "base/threading/thread_task_runner_handle.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkCanvas.h"
@@ -66,11 +66,11 @@ class SoftwareOutputDeviceOzoneTest : public testing::Test {
protected:
std::unique_ptr<content::SoftwareOutputDeviceOzone> output_device_;
- bool enable_pixel_output_;
+ bool enable_pixel_output_ = false;
private:
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
std::unique_ptr<ui::Compositor> compositor_;
- std::unique_ptr<base::MessageLoop> message_loop_;
TestPlatformWindowDelegate window_delegate_;
std::unique_ptr<ui::PlatformWindow> window_;
@@ -78,9 +78,8 @@ class SoftwareOutputDeviceOzoneTest : public testing::Test {
};
SoftwareOutputDeviceOzoneTest::SoftwareOutputDeviceOzoneTest()
- : enable_pixel_output_(false) {
- message_loop_.reset(new base::MessageLoopForUI);
-}
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
SoftwareOutputDeviceOzoneTest::~SoftwareOutputDeviceOzoneTest() {
}
« no previous file with comments | « no previous file | ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698