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

Unified Diff: services/shell/tests/shutdown/shutdown_unittest.cc

Issue 2419723002: Move services/shell to services/service_manager (Closed)
Patch Set: rebase Created 4 years, 2 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: services/shell/tests/shutdown/shutdown_unittest.cc
diff --git a/services/shell/tests/shutdown/shutdown_unittest.cc b/services/shell/tests/shutdown/shutdown_unittest.cc
deleted file mode 100644
index 7b51376c4fb98bfa66de77a00d984291f6d6de13..0000000000000000000000000000000000000000
--- a/services/shell/tests/shutdown/shutdown_unittest.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2016 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 "base/run_loop.h"
-#include "mojo/public/cpp/bindings/binding_set.h"
-#include "services/shell/public/cpp/service_test.h"
-#include "services/shell/tests/shutdown/shutdown_unittest.mojom.h"
-
-namespace shell {
-namespace {
-
-class ShutdownTest : public test::ServiceTest {
- public:
- ShutdownTest() : test::ServiceTest("service:shutdown_unittest") {}
- ~ShutdownTest() override {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShutdownTest);
-};
-
-TEST_F(ShutdownTest, ConnectRace) {
- // This test exercises a number of potential shutdown races that can lead to
- // client deadlock if any of various parts of the EDK or shell service are not
- // working as intended.
-
- mojom::ShutdownTestClientControllerPtr control;
- connector()->ConnectToInterface("service:shutdown_client", &control);
-
- // Connect to shutdown_service and immediately request that it shut down.
- mojom::ShutdownTestServicePtr service;
- connector()->ConnectToInterface("service:shutdown_service", &service);
- service->ShutDown();
-
- // Tell shutdown_client to connect to an interface on shutdown_service and
- // then block waiting for the interface pipe to signal something. If anything
- // goes wrong, its pipe won't signal and the client process will hang without
- // responding to this request.
- base::RunLoop loop;
- control->ConnectAndWait(loop.QuitClosure());
- loop.Run();
-}
-
-} // namespace
-} // namespace shell
« no previous file with comments | « services/shell/tests/shutdown/shutdown_service_manifest.json ('k') | services/shell/tests/shutdown/shutdown_unittest.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698