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

Unified Diff: chrome/browser/devtools/device/port_forwarding_browsertest.cc

Issue 2132593002: Remove remaining calls to deprecated MessageLoop methods on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: h264_vt_encoder_unittest.cc Created 4 years, 5 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/devtools/device/port_forwarding_browsertest.cc
diff --git a/chrome/browser/devtools/device/port_forwarding_browsertest.cc b/chrome/browser/devtools/device/port_forwarding_browsertest.cc
index b9457dad22614bd7f2a1005ab7e65038106b2bbe..475c52c1fb9d18dc25fa53661c3e5a2a4a00f6d0 100644
--- a/chrome/browser/devtools/device/port_forwarding_browsertest.cc
+++ b/chrome/browser/devtools/device/port_forwarding_browsertest.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
-#include "base/location.h"
-#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/devtools/device/devtools_android_bridge.h"
@@ -177,10 +177,13 @@ IN_PROC_BROWSER_TEST_F(PortForwardingDisconnectTest, DisconnectOnRelease) {
std::unique_ptr<Listener> wait_for_port_forwarding(new Listener(profile));
content::RunMessageLoop();
+ base::RunLoop run_loop;
+
self_provider->set_release_callback_for_test(
- base::Bind(&base::MessageLoop::PostTask,
- base::Unretained(base::MessageLoop::current()), FROM_HERE,
- base::MessageLoop::QuitWhenIdleClosure()));
+ base::Bind(base::IgnoreResult(&base::SingleThreadTaskRunner::PostTask),
+ base::ThreadTaskRunnerHandle::Get(), FROM_HERE,
+ run_loop.QuitWhenIdleClosure()));
wait_for_port_forwarding.reset();
- content::RunMessageLoop();
+
+ content::RunThisRunLoop(&run_loop);
}

Powered by Google App Engine
This is Rietveld 408576698