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

Unified Diff: mojo/shell/tests/loader_unittest.cc

Issue 1769163002: Add a instance groups to Connect(), and introduce an Identity struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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/shell/tests/lifecycle/lifecycle_unittest.cc ('k') | mojo/shell/tests/shell/driver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/tests/loader_unittest.cc
diff --git a/mojo/shell/tests/loader_unittest.cc b/mojo/shell/tests/loader_unittest.cc
index 45156befa306ff06fa6e29cfe9be0406e4d6359d..56ffd6fbb1a590e6a34f8781bacd72f64b4fce44 100644
--- a/mojo/shell/tests/loader_unittest.cc
+++ b/mojo/shell/tests/loader_unittest.cc
@@ -123,7 +123,7 @@ class TestLoader : public Loader,
// mojo::ShellClient implementation.
bool AcceptConnection(Connection* connection) override {
connection->AddInterface<TestService>(this);
- last_requestor_name_ = connection->GetRemoteApplicationName();
+ last_requestor_name_ = connection->GetRemoteIdentity().name();
return true;
}
@@ -353,14 +353,14 @@ class Tester : public ShellClient,
bool AcceptConnection(Connection* connection) override {
if (!requestor_name_.empty() &&
- requestor_name_ != connection->GetRemoteApplicationName()) {
+ requestor_name_ != connection->GetRemoteIdentity().name()) {
context_->set_tester_called_quit();
context_->QuitSoon();
base::MessageLoop::current()->QuitWhenIdle();
return false;
}
// If we're coming from A, then add B, otherwise A.
- if (connection->GetRemoteApplicationName() == kTestAURLString)
+ if (connection->GetRemoteIdentity().name() == kTestAURLString)
connection->AddInterface<TestB>(this);
else
connection->AddInterface<TestA>(this);
@@ -433,7 +433,7 @@ class LoaderTest : public testing::Test {
mojom::InterfaceProviderPtr remote_interfaces;
scoped_ptr<ConnectParams> params(new ConnectParams);
params->set_source(CreateShellIdentity());
- params->set_target(Identity(name));
+ params->set_target(Identity(name, mojom::kRootUserID));
params->set_remote_interfaces(GetProxy(&remote_interfaces));
params->set_connect_callback(
base::Bind(&OnConnect, base::Unretained(&loop)));
@@ -523,7 +523,7 @@ TEST_F(LoaderTest, TestEndApplicationClosure) {
bool called = false;
scoped_ptr<ConnectParams> params(new ConnectParams);
params->set_source(CreateShellIdentity());
- params->set_target(Identity("test:test", "", mojom::kRootUserID));
+ params->set_target(Identity("test:test", mojom::kRootUserID));
shell_->SetInstanceQuitCallback(
base::Bind(&QuitClosure, params->target(), &called));
shell_->Connect(std::move(params));
« no previous file with comments | « mojo/shell/tests/lifecycle/lifecycle_unittest.cc ('k') | mojo/shell/tests/shell/driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698