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

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

Issue 728043002: Revert of Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/shared_buffer_dispatcher_unittest.cc ('k') | mojo/edk/system/test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/simple_dispatcher_unittest.cc
diff --git a/mojo/edk/system/simple_dispatcher_unittest.cc b/mojo/edk/system/simple_dispatcher_unittest.cc
index f23ff68b638a0aeaa301f6bca54b875463f87f23..502e34bba5dd1bf7e08e7de0a0912948ad3d8bfe 100644
--- a/mojo/edk/system/simple_dispatcher_unittest.cc
+++ b/mojo/edk/system/simple_dispatcher_unittest.cc
@@ -343,9 +343,14 @@
scoped_refptr<MockSimpleDispatcher> d(new MockSimpleDispatcher());
{
d->SetSatisfiedSignals(MOJO_HANDLE_SIGNAL_READABLE);
- test::WaiterThread thread(d, MOJO_HANDLE_SIGNAL_READABLE,
- MOJO_DEADLINE_INDEFINITE, 1, &did_wait, &result,
- &context, &hss);
+ test::WaiterThread thread(d,
+ MOJO_HANDLE_SIGNAL_READABLE,
+ MOJO_DEADLINE_INDEFINITE,
+ 1,
+ &did_wait,
+ &result,
+ &context,
+ &hss);
stopwatch.Start();
thread.Start();
} // Joins the thread.
@@ -363,9 +368,14 @@
{
scoped_refptr<MockSimpleDispatcher> d(new MockSimpleDispatcher());
{
- test::WaiterThread thread(d, MOJO_HANDLE_SIGNAL_READABLE,
- MOJO_DEADLINE_INDEFINITE, 2, &did_wait, &result,
- &context, &hss);
+ test::WaiterThread thread(d,
+ MOJO_HANDLE_SIGNAL_READABLE,
+ MOJO_DEADLINE_INDEFINITE,
+ 2,
+ &did_wait,
+ &result,
+ &context,
+ &hss);
stopwatch.Start();
thread.Start();
base::PlatformThread::Sleep(2 * test::EpsilonTimeout());
@@ -387,9 +397,14 @@
{
scoped_refptr<MockSimpleDispatcher> d(new MockSimpleDispatcher());
{
- test::WaiterThread thread(d, MOJO_HANDLE_SIGNAL_READABLE,
- MOJO_DEADLINE_INDEFINITE, 3, &did_wait, &result,
- &context, &hss);
+ test::WaiterThread thread(d,
+ MOJO_HANDLE_SIGNAL_READABLE,
+ MOJO_DEADLINE_INDEFINITE,
+ 3,
+ &did_wait,
+ &result,
+ &context,
+ &hss);
stopwatch.Start();
thread.Start();
base::PlatformThread::Sleep(2 * test::EpsilonTimeout());
@@ -409,9 +424,14 @@
// Wait for readable and dispatcher gets closed.
{
scoped_refptr<MockSimpleDispatcher> d(new MockSimpleDispatcher());
- test::WaiterThread thread(d, MOJO_HANDLE_SIGNAL_READABLE,
- MOJO_DEADLINE_INDEFINITE, 4, &did_wait, &result,
- &context, &hss);
+ test::WaiterThread thread(d,
+ MOJO_HANDLE_SIGNAL_READABLE,
+ MOJO_DEADLINE_INDEFINITE,
+ 4,
+ &did_wait,
+ &result,
+ &context,
+ &hss);
stopwatch.Start();
thread.Start();
base::PlatformThread::Sleep(2 * test::EpsilonTimeout());
@@ -430,9 +450,14 @@
{
scoped_refptr<MockSimpleDispatcher> d(new MockSimpleDispatcher());
{
- test::WaiterThread thread(d, MOJO_HANDLE_SIGNAL_READABLE,
- 2 * test::EpsilonTimeout().InMicroseconds(), 5,
- &did_wait, &result, &context, &hss);
+ test::WaiterThread thread(d,
+ MOJO_HANDLE_SIGNAL_READABLE,
+ 2 * test::EpsilonTimeout().InMicroseconds(),
+ 5,
+ &did_wait,
+ &result,
+ &context,
+ &hss);
stopwatch.Start();
thread.Start();
base::PlatformThread::Sleep(1 * test::EpsilonTimeout());
@@ -471,9 +496,14 @@
scoped_refptr<MockSimpleDispatcher> d(new MockSimpleDispatcher());
ScopedVector<test::WaiterThread> threads;
for (uint32_t i = 0; i < kNumWaiters; i++) {
- threads.push_back(new test::WaiterThread(
- d, MOJO_HANDLE_SIGNAL_READABLE, MOJO_DEADLINE_INDEFINITE, i,
- &did_wait[i], &result[i], &context[i], &hss[i]));
+ threads.push_back(new test::WaiterThread(d,
+ MOJO_HANDLE_SIGNAL_READABLE,
+ MOJO_DEADLINE_INDEFINITE,
+ i,
+ &did_wait[i],
+ &result[i],
+ &context[i],
+ &hss[i]));
threads.back()->Start();
}
base::PlatformThread::Sleep(2 * test::EpsilonTimeout());
@@ -494,15 +524,25 @@
scoped_refptr<MockSimpleDispatcher> d(new MockSimpleDispatcher());
ScopedVector<test::WaiterThread> threads;
for (uint32_t i = 0; i < kNumWaiters / 2; i++) {
- threads.push_back(new test::WaiterThread(
- d, MOJO_HANDLE_SIGNAL_READABLE, MOJO_DEADLINE_INDEFINITE, i,
- &did_wait[i], &result[i], &context[i], &hss[i]));
+ threads.push_back(new test::WaiterThread(d,
+ MOJO_HANDLE_SIGNAL_READABLE,
+ MOJO_DEADLINE_INDEFINITE,
+ i,
+ &did_wait[i],
+ &result[i],
+ &context[i],
+ &hss[i]));
threads.back()->Start();
}
for (uint32_t i = kNumWaiters / 2; i < kNumWaiters; i++) {
- threads.push_back(new test::WaiterThread(
- d, MOJO_HANDLE_SIGNAL_WRITABLE, MOJO_DEADLINE_INDEFINITE, i,
- &did_wait[i], &result[i], &context[i], &hss[i]));
+ threads.push_back(new test::WaiterThread(d,
+ MOJO_HANDLE_SIGNAL_WRITABLE,
+ MOJO_DEADLINE_INDEFINITE,
+ i,
+ &did_wait[i],
+ &result[i],
+ &context[i],
+ &hss[i]));
threads.back()->Start();
}
base::PlatformThread::Sleep(2 * test::EpsilonTimeout());
@@ -531,15 +571,25 @@
scoped_refptr<MockSimpleDispatcher> d(new MockSimpleDispatcher());
ScopedVector<test::WaiterThread> threads;
for (uint32_t i = 0; i < kNumWaiters / 2; i++) {
- threads.push_back(new test::WaiterThread(
- d, MOJO_HANDLE_SIGNAL_READABLE, MOJO_DEADLINE_INDEFINITE, i,
- &did_wait[i], &result[i], &context[i], &hss[i]));
+ threads.push_back(new test::WaiterThread(d,
+ MOJO_HANDLE_SIGNAL_READABLE,
+ MOJO_DEADLINE_INDEFINITE,
+ i,
+ &did_wait[i],
+ &result[i],
+ &context[i],
+ &hss[i]));
threads.back()->Start();
}
for (uint32_t i = kNumWaiters / 2; i < kNumWaiters; i++) {
- threads.push_back(new test::WaiterThread(
- d, MOJO_HANDLE_SIGNAL_WRITABLE, MOJO_DEADLINE_INDEFINITE, i,
- &did_wait[i], &result[i], &context[i], &hss[i]));
+ threads.push_back(new test::WaiterThread(d,
+ MOJO_HANDLE_SIGNAL_WRITABLE,
+ MOJO_DEADLINE_INDEFINITE,
+ i,
+ &did_wait[i],
+ &result[i],
+ &context[i],
+ &hss[i]));
threads.back()->Start();
}
base::PlatformThread::Sleep(1 * test::EpsilonTimeout());
@@ -569,17 +619,27 @@
scoped_refptr<MockSimpleDispatcher> d(new MockSimpleDispatcher());
ScopedVector<test::WaiterThread> threads;
for (uint32_t i = 0; i < kNumWaiters / 2; i++) {
- threads.push_back(new test::WaiterThread(
- d, MOJO_HANDLE_SIGNAL_READABLE,
- 3 * test::EpsilonTimeout().InMicroseconds(), i, &did_wait[i],
- &result[i], &context[i], &hss[i]));
+ threads.push_back(
+ new test::WaiterThread(d,
+ MOJO_HANDLE_SIGNAL_READABLE,
+ 3 * test::EpsilonTimeout().InMicroseconds(),
+ i,
+ &did_wait[i],
+ &result[i],
+ &context[i],
+ &hss[i]));
threads.back()->Start();
}
for (uint32_t i = kNumWaiters / 2; i < kNumWaiters; i++) {
- threads.push_back(new test::WaiterThread(
- d, MOJO_HANDLE_SIGNAL_WRITABLE,
- 1 * test::EpsilonTimeout().InMicroseconds(), i, &did_wait[i],
- &result[i], &context[i], &hss[i]));
+ threads.push_back(
+ new test::WaiterThread(d,
+ MOJO_HANDLE_SIGNAL_WRITABLE,
+ 1 * test::EpsilonTimeout().InMicroseconds(),
+ i,
+ &did_wait[i],
+ &result[i],
+ &context[i],
+ &hss[i]));
threads.back()->Start();
}
base::PlatformThread::Sleep(2 * test::EpsilonTimeout());
« no previous file with comments | « mojo/edk/system/shared_buffer_dispatcher_unittest.cc ('k') | mojo/edk/system/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698