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

Unified Diff: mojo/system/test_utils.h

Issue 140403002: Mojo: Add the ability to hook up a channel to the embedder API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win Created 6 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/system/test_embedder.cc ('k') | mojo/system/test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/test_utils.h
diff --git a/mojo/system/test_utils.h b/mojo/system/test_utils.h
index d40490f5f2a48d597dc16f5d6215cc94e30f8982..73949b9055be2825d35151e67b1c91175d8ea692 100644
--- a/mojo/system/test_utils.h
+++ b/mojo/system/test_utils.h
@@ -7,11 +7,14 @@
#include <stdint.h>
-#include "base/basictypes.h"
#include "base/callback_forward.h"
+#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/task_runner.h"
+#include "base/threading/thread.h"
#include "base/time/time.h"
+#include "testing/gtest/include/gtest/gtest.h"
namespace tracked_objects {
class Location;
@@ -47,6 +50,31 @@ void PostTaskAndWait(scoped_refptr<base::TaskRunner> task_runner,
const tracked_objects::Location& from_here,
const base::Closure& task);
+// TestWithIOThreadBase --------------------------------------------------------
+
+class TestWithIOThreadBase : public testing::Test {
+ public:
+ TestWithIOThreadBase();
+ virtual ~TestWithIOThreadBase();
+
+ virtual void SetUp() OVERRIDE;
+ virtual void TearDown() OVERRIDE;
+
+ protected:
+ base::MessageLoop* io_thread_message_loop() {
+ return io_thread_.message_loop();
+ }
+
+ scoped_refptr<base::TaskRunner> io_thread_task_runner() {
+ return io_thread_message_loop()->message_loop_proxy();
+ }
+
+ private:
+ base::Thread io_thread_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestWithIOThreadBase);
+};
+
} // namespace test
} // namespace system
} // namespace mojo
« no previous file with comments | « mojo/system/test_embedder.cc ('k') | mojo/system/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698