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

Unified Diff: services/shell/tests/connect/connect_unittest.cc

Issue 1910043002: Provide capability classes from Mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
Index: services/shell/tests/connect/connect_unittest.cc
diff --git a/services/shell/tests/connect/connect_unittest.cc b/services/shell/tests/connect/connect_unittest.cc
index b144468049f31839233f34870775ef60f5b95cd1..9805cff223a63afde62c0a4bdbf4111f448ef4b3 100644
--- a/services/shell/tests/connect/connect_unittest.cc
+++ b/services/shell/tests/connect/connect_unittest.cc
@@ -307,6 +307,19 @@ TEST_F(ConnectTest, CapabilityClasses) {
EXPECT_EQ("CLASS APP", string2);
}
+TEST_F(ConnectTest, ConnectWithoutExplicitClassBlocked) {
+ // We not be able to bind a ClassInterfacePtr since the connect_unittest app
+ // does not explicitly request the "class" capability from
+ // connect_test_class_app. This test will hang if it is bound.
+ std::unique_ptr<Connection> connection =
+ connector()->Connect(kTestClassAppName);
+ test::mojom::ClassInterfacePtr class_interface;
+ connection->GetInterface(&class_interface);
+ base::RunLoop loop;
+ class_interface.set_connection_error_handler(base::Bind(&QuitLoop, &loop));
+ loop.Run();
+}
+
TEST_F(ConnectTest, ConnectAsDifferentUser_Allowed) {
std::unique_ptr<Connection> connection = connector()->Connect(kTestAppName);
test::mojom::UserIdTestPtr user_id_test;

Powered by Google App Engine
This is Rietveld 408576698