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

Unified Diff: components/arc/arc_bridge_service_unittest.cc

Issue 1829703002: Add ArcEnabled policy implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comments. Created 4 years, 8 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 | « components/arc/arc_bridge_bootstrap.cc ('k') | components/arc/arc_service_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_bridge_service_unittest.cc
diff --git a/components/arc/arc_bridge_service_unittest.cc b/components/arc/arc_bridge_service_unittest.cc
index c753f239c7dcf6e277174e8258dc2fb0135772d5..e3eae5973310572cc5f8aad40fe9cd2ee45fa07c 100644
--- a/components/arc/arc_bridge_service_unittest.cc
+++ b/components/arc/arc_bridge_service_unittest.cc
@@ -2,14 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <utility>
-
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/macros.h"
#include "base/run_loop.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "components/arc/arc_bridge_service_impl.h"
+#include "components/arc/test/fake_arc_bridge_bootstrap.h"
#include "components/arc/test/fake_arc_bridge_instance.h"
#include "ipc/mojo/scoped_ipc_support.h"
#include "mojo/public/cpp/system/message_pipe.h"
@@ -17,37 +16,6 @@
namespace arc {
-namespace {
-
-// A fake ArcBridgeBootstrap that creates a local connection.
-class FakeArcBridgeBootstrap : public ArcBridgeBootstrap {
- public:
- explicit FakeArcBridgeBootstrap(FakeArcBridgeInstance* instance)
- : instance_(instance) {}
- ~FakeArcBridgeBootstrap() override {}
-
- void Start() override {
- DCHECK(delegate_);
- ArcBridgeInstancePtr instance;
- instance_->Bind(mojo::GetProxy(&instance));
- delegate_->OnConnectionEstablished(std::move(instance));
- }
-
- void Stop() override {
- DCHECK(delegate_);
- instance_->Unbind();
- delegate_->OnStopped();
- }
-
- private:
- // Owned by the caller.
- FakeArcBridgeInstance* instance_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeArcBridgeBootstrap);
-};
-
-} // namespace
-
class ArcBridgeTest : public testing::Test, public ArcBridgeService::Observer {
public:
ArcBridgeTest() : ready_(false) {}
« no previous file with comments | « components/arc/arc_bridge_bootstrap.cc ('k') | components/arc/arc_service_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698