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

Unified Diff: mojo/system/raw_channel_posix_unittest.cc

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/embedder_unittest.cc ('k') | mojo/system/remote_message_pipe_posix_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/raw_channel_posix_unittest.cc
diff --git a/mojo/system/raw_channel_posix_unittest.cc b/mojo/system/raw_channel_posix_unittest.cc
index 8d0adc678c34555e6056f1e43f72b0b2ae0fc668..2324001dc4a009abc8a3c972df7d3fd21c6e82fd 100644
--- a/mojo/system/raw_channel_posix_unittest.cc
+++ b/mojo/system/raw_channel_posix_unittest.cc
@@ -15,7 +15,6 @@
#include "base/basictypes.h"
#include "base/bind.h"
-#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/location.h"
#include "base/logging.h"
@@ -28,14 +27,12 @@
#include "base/synchronization/waitable_event.h"
#include "base/threading/platform_thread.h" // For |Sleep()|.
#include "base/threading/simple_thread.h"
-#include "base/threading/thread.h"
#include "base/time/time.h"
#include "mojo/system/message_in_transit.h"
#include "mojo/system/platform_channel_pair.h"
#include "mojo/system/platform_handle.h"
#include "mojo/system/scoped_platform_handle.h"
#include "mojo/system/test_utils.h"
-#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
namespace system {
@@ -66,17 +63,13 @@ void InitOnIOThread(RawChannel* raw_channel) {
// -----------------------------------------------------------------------------
-class RawChannelPosixTest : public testing::Test {
+class RawChannelPosixTest : public test::TestWithIOThreadBase {
public:
- RawChannelPosixTest() : io_thread_("io_thread") {
- }
-
- virtual ~RawChannelPosixTest() {
- }
+ RawChannelPosixTest() {}
+ virtual ~RawChannelPosixTest() {}
virtual void SetUp() OVERRIDE {
- io_thread_.StartWithOptions(
- base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
+ test::TestWithIOThreadBase::SetUp();
PlatformChannelPair channel_pair;
handles[0] = channel_pair.PassServerHandle();
@@ -87,23 +80,13 @@ class RawChannelPosixTest : public testing::Test {
handles[0].reset();
handles[1].reset();
- io_thread_.Stop();
+ test::TestWithIOThreadBase::TearDown();
}
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();
- }
-
ScopedPlatformHandle handles[2];
private:
- base::Thread io_thread_;
-
DISALLOW_COPY_AND_ASSIGN(RawChannelPosixTest);
};
@@ -519,7 +502,6 @@ TEST_F(RawChannelPosixTest, OnFatalError) {
FROM_HERE,
base::Bind(&RawChannel::Shutdown,
base::Unretained(rc.get())));
-
}
// RawChannelPosixTest.WriteMessageAfterShutdown -------------------------------
« no previous file with comments | « mojo/system/embedder_unittest.cc ('k') | mojo/system/remote_message_pipe_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698