| 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());
 | 
| 
 |