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

Unified Diff: third_party/mojo/src/mojo/edk/system/channel_test_base.cc

Issue 1676913002: [mojo] Delete third_party/mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: let's try that again Created 4 years, 10 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: third_party/mojo/src/mojo/edk/system/channel_test_base.cc
diff --git a/third_party/mojo/src/mojo/edk/system/channel_test_base.cc b/third_party/mojo/src/mojo/edk/system/channel_test_base.cc
deleted file mode 100644
index bfe429d0af8addf7fc61a69f691d99c31033bd62..0000000000000000000000000000000000000000
--- a/third_party/mojo/src/mojo/edk/system/channel_test_base.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "third_party/mojo/src/mojo/edk/system/channel_test_base.h"
-
-#include <utility>
-
-#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
-#include "third_party/mojo/src/mojo/edk/embedder/platform_channel_pair.h"
-#include "third_party/mojo/src/mojo/edk/system/raw_channel.h"
-
-namespace mojo {
-namespace system {
-namespace test {
-
-ChannelTestBase::ChannelTestBase()
- : io_thread_(base::TestIOThread::kAutoStart) {
-}
-
-ChannelTestBase::~ChannelTestBase() {
-}
-
-void ChannelTestBase::SetUp() {
- PostMethodToIOThreadAndWait(FROM_HERE, &ChannelTestBase::SetUpOnIOThread);
-}
-
-void ChannelTestBase::CreateChannelOnIOThread(unsigned i) {
- CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
-
- CHECK(!channels_[i]);
- channels_[i] = new Channel(&platform_support_);
-}
-
-void ChannelTestBase::InitChannelOnIOThread(unsigned i) {
- CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
-
- CHECK(raw_channels_[i]);
- CHECK(channels_[i]);
- channels_[i]->Init(std::move(raw_channels_[i]));
-}
-
-void ChannelTestBase::CreateAndInitChannelOnIOThread(unsigned i) {
- CreateChannelOnIOThread(i);
- InitChannelOnIOThread(i);
-}
-
-void ChannelTestBase::ShutdownChannelOnIOThread(unsigned i) {
- CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
-
- CHECK(channels_[i]);
- channels_[i]->Shutdown();
-}
-
-void ChannelTestBase::ShutdownAndReleaseChannelOnIOThread(unsigned i) {
- ShutdownChannelOnIOThread(i);
- channels_[i] = nullptr;
-}
-
-void ChannelTestBase::SetUpOnIOThread() {
- CHECK_EQ(base::MessageLoop::current(), io_thread()->message_loop());
-
- embedder::PlatformChannelPair channel_pair;
- raw_channels_[0] = RawChannel::Create(channel_pair.PassServerHandle());
- raw_channels_[1] = RawChannel::Create(channel_pair.PassClientHandle());
-}
-
-} // namespace test
-} // namespace system
-} // namespace mojo
« no previous file with comments | « third_party/mojo/src/mojo/edk/system/channel_test_base.h ('k') | third_party/mojo/src/mojo/edk/system/channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698