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

Unified Diff: ipc/ipc_sync_channel_unittest.cc

Issue 12225081: ipc: Convert MessageLoop::RunUntilIdle() usage to base::RunLoop variant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_channel_unittest.cc
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index 66f369eef636142d86787c0b0bd10d5a6eec869f..203d1088ba88bb4630803b05fd9f2663535a76a5 100644
--- a/ipc/ipc_sync_channel_unittest.cc
+++ b/ipc/ipc_sync_channel_unittest.cc
@@ -1,8 +1,6 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-//
-// Unit test for SyncChannel.
#include "ipc/ipc_sync_channel.h"
@@ -15,6 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/process_util.h"
+#include "base/run_loop.h"
#include "base/string_util.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread.h"
@@ -27,8 +26,8 @@
#include "testing/gtest/include/gtest/gtest.h"
using base::WaitableEvent;
-using namespace IPC;
+namespace IPC {
namespace {
// Base class for a "process" with listener and IPC threads.
@@ -181,7 +180,7 @@ class Worker : public Listener, public Sender {
// SyncChannel needs to be destructed on the thread that it was created on.
channel_.reset();
- MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
ipc_thread_.message_loop()->PostTask(
FROM_HERE, base::Bind(&Worker::OnIPCThreadShutdown, this,
@@ -190,7 +189,7 @@ class Worker : public Listener, public Sender {
void OnIPCThreadShutdown(WaitableEvent* listener_event,
WaitableEvent* ipc_event) {
- MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
ipc_event->Signal();
listener_thread_.message_loop()->PostTask(
@@ -199,7 +198,7 @@ class Worker : public Listener, public Sender {
}
void OnListenerThreadShutdown2(WaitableEvent* listener_event) {
- MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
listener_event->Signal();
}
@@ -1887,3 +1886,4 @@ TEST_F(IPCSyncChannelTest, Verified) {
}
} // namespace
+} // namespace IPC
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698