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

Unified Diff: ui/base/x/selection_requestor_unittest.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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 | « ui/aura/window_event_dispatcher_unittest.cc ('k') | ui/events/platform/platform_event_source_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/selection_requestor_unittest.cc
diff --git a/ui/base/x/selection_requestor_unittest.cc b/ui/base/x/selection_requestor_unittest.cc
index b4e84d575324cbe22647bf51daa8805f8618158c..43e14d50379a062b28431ba671a08ecdf507fecf 100644
--- a/ui/base/x/selection_requestor_unittest.cc
+++ b/ui/base/x/selection_requestor_unittest.cc
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted_memory.h"
#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/x/selection_utils.h"
#include "ui/base/x/x11_util.h"
@@ -141,25 +142,19 @@ TEST_F(SelectionRequestorTest, NestedRequests) {
XAtom target2 = atom_cache_.GetAtom("TARGET2");
base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
- loop->PostTask(FROM_HERE,
- base::Bind(&PerformBlockingConvertSelection,
- base::Unretained(requestor_.get()),
- base::Unretained(&atom_cache_),
- selection,
- target2,
- "Data2"));
- loop->PostTask(FROM_HERE,
- base::Bind(&SelectionRequestorTest::SendSelectionNotify,
- base::Unretained(this),
- selection,
- target1,
- "Data1"));
- loop->PostTask(FROM_HERE,
- base::Bind(&SelectionRequestorTest::SendSelectionNotify,
- base::Unretained(this),
- selection,
- target2,
- "Data2"));
+ loop->task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(&PerformBlockingConvertSelection,
+ base::Unretained(requestor_.get()),
+ base::Unretained(&atom_cache_), selection, target2, "Data2"));
+ loop->task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(&SelectionRequestorTest::SendSelectionNotify,
+ base::Unretained(this), selection, target1, "Data1"));
+ loop->task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(&SelectionRequestorTest::SendSelectionNotify,
+ base::Unretained(this), selection, target2, "Data2"));
PerformBlockingConvertSelection(
requestor_.get(), &atom_cache_, selection, target1, "Data1");
}
« no previous file with comments | « ui/aura/window_event_dispatcher_unittest.cc ('k') | ui/events/platform/platform_event_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698