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

Unified Diff: mojo/edk/system/remote_message_pipe_unittest.cc

Issue 1639093002: Add //mojo/edk/platform/thread_utils.* containing "yield" and "sleep". (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 | « mojo/edk/system/raw_channel_unittest.cc ('k') | mojo/edk/system/simple_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/remote_message_pipe_unittest.cc
diff --git a/mojo/edk/system/remote_message_pipe_unittest.cc b/mojo/edk/system/remote_message_pipe_unittest.cc
index 0963c352ea2b98a737b1a758d9b5bd15d77209c9..25097e50684f6df009d7f96b1a66b4b313ba08bb 100644
--- a/mojo/edk/system/remote_message_pipe_unittest.cc
+++ b/mojo/edk/system/remote_message_pipe_unittest.cc
@@ -15,6 +15,7 @@
#include "mojo/edk/embedder/platform_shared_buffer.h"
#include "mojo/edk/embedder/simple_platform_support.h"
#include "mojo/edk/platform/scoped_platform_handle.h"
+#include "mojo/edk/platform/thread_utils.h"
#include "mojo/edk/system/channel.h"
#include "mojo/edk/system/channel_endpoint.h"
#include "mojo/edk/system/channel_endpoint_id.h"
@@ -25,7 +26,6 @@
#include "mojo/edk/system/raw_channel.h"
#include "mojo/edk/system/shared_buffer_dispatcher.h"
#include "mojo/edk/system/test/scoped_test_dir.h"
-#include "mojo/edk/system/test/sleep.h"
#include "mojo/edk/system/test/test_io_thread.h"
#include "mojo/edk/system/test/timeouts.h"
#include "mojo/edk/system/waiter.h"
@@ -36,6 +36,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using mojo::platform::ScopedPlatformHandle;
+using mojo::platform::ThreadSleep;
using mojo::util::MakeRefCounted;
using mojo::util::RefPtr;
@@ -1125,18 +1126,18 @@ TEST_F(RemoteMessagePipeTest, RacingClosesStress) {
BootstrapChannelEndpointNoWait(1, std::move(ep1));
if (i & 1u) {
- io_thread()->PostTask([delay]() { test::Sleep(delay); });
+ io_thread()->PostTask([delay]() { ThreadSleep(delay); });
}
if (i & 2u)
- test::Sleep(delay);
+ ThreadSleep(delay);
mp0->Close(0);
if (i & 4u) {
- io_thread()->PostTask([delay]() { test::Sleep(delay); });
+ io_thread()->PostTask([delay]() { ThreadSleep(delay); });
}
if (i & 8u)
- test::Sleep(delay);
+ ThreadSleep(delay);
mp1->Close(1);
« no previous file with comments | « mojo/edk/system/raw_channel_unittest.cc ('k') | mojo/edk/system/simple_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698