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

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

Issue 728133002: Update mojo sdk to rev e01f9a49449381a5eb430c1fd88bf2cae73ec35a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android + ios gyp fixes 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 502e34bba5dd1bf7e08e7de0a0912948ad3d8bfe..f23ff68b638a0aeaa301f6bca54b875463f87f23 100644
--- a/mojo/edk/system/simple_dispatcher_unittest.cc
+++ b/mojo/edk/system/simple_dispatcher_unittest.cc
@@ -343,14 +343,9 @@ TEST(SimpleDispatcherTest, MAYBE_BasicThreaded) {
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.
@@ -368,14 +363,9 @@ TEST(SimpleDispatcherTest, MAYBE_BasicThreaded) {
{
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());
@@ -397,14 +387,9 @@ TEST(SimpleDispatcherTest, MAYBE_BasicThreaded) {
{
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());
@@ -424,14 +409,9 @@ TEST(SimpleDispatcherTest, MAYBE_BasicThreaded) {
// 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());
@@ -450,14 +430,9 @@ TEST(SimpleDispatcherTest, MAYBE_BasicThreaded) {
{
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());
@@ -496,14 +471,9 @@ TEST(SimpleDispatcherTest, MAYBE_MultipleWaiters) {
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());
@@ -524,25 +494,15 @@ TEST(SimpleDispatcherTest, MAYBE_MultipleWaiters) {
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());
@@ -571,25 +531,15 @@ TEST(SimpleDispatcherTest, MAYBE_MultipleWaiters) {
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());
@@ -619,27 +569,17 @@ TEST(SimpleDispatcherTest, MAYBE_MultipleWaiters) {
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