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

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

Issue 1361143004: EDK: Add a mojo::test::SimpleTestThread (and use it). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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
Index: mojo/edk/system/dispatcher_unittest.cc
diff --git a/mojo/edk/system/dispatcher_unittest.cc b/mojo/edk/system/dispatcher_unittest.cc
index 1f95c514df07846e0156933904680e21efd55632..b547182d847bd62048cdf69ecb7b8ac6840e4844 100644
--- a/mojo/edk/system/dispatcher_unittest.cc
+++ b/mojo/edk/system/dispatcher_unittest.cc
@@ -9,10 +9,10 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "base/synchronization/waitable_event.h"
-#include "base/threading/simple_thread.h"
#include "mojo/edk/embedder/platform_shared_buffer.h"
#include "mojo/edk/system/memory.h"
#include "mojo/edk/system/waiter.h"
+#include "mojo/edk/test/simple_test_thread.h"
#include "mojo/public/cpp/system/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -115,7 +115,7 @@ TEST(DispatcherTest, Basic) {
EXPECT_EQ(0u, hss.satisfiable_signals);
}
-class ThreadSafetyStressThread : public base::SimpleThread {
+class ThreadSafetyStressThread : public mojo::test::SimpleTestThread {
public:
enum DispatcherOp {
CLOSE = 0,
@@ -137,10 +137,7 @@ class ThreadSafetyStressThread : public base::SimpleThread {
ThreadSafetyStressThread(base::WaitableEvent* event,
scoped_refptr<Dispatcher> dispatcher,
DispatcherOp op)
- : base::SimpleThread("thread_safety_stress_thread"),
- event_(event),
- dispatcher_(dispatcher),
- op_(op) {
+ : event_(event), dispatcher_(dispatcher), op_(op) {
CHECK_LE(0, op_);
CHECK_LT(op_, DISPATCHER_OP_COUNT);
}

Powered by Google App Engine
This is Rietveld 408576698