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

Unified Diff: mojo/shell/tests/lifecycle/lifecycle_unittest.cc

Issue 1775813002: Eliminate CapabilityFilter parameter from CreateInstance, instead reading it from the associated ma… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@41qual
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
Index: mojo/shell/tests/lifecycle/lifecycle_unittest.cc
diff --git a/mojo/shell/tests/lifecycle/lifecycle_unittest.cc b/mojo/shell/tests/lifecycle/lifecycle_unittest.cc
index e85d08b349dd1ab438232a89d165f803df16b1d3..a9829f8637885b33b76576a21f0c40d0c3c0e933 100644
--- a/mojo/shell/tests/lifecycle/lifecycle_unittest.cc
+++ b/mojo/shell/tests/lifecycle/lifecycle_unittest.cc
@@ -203,12 +203,6 @@ class LifecycleTest : public mojo::test::ShellTest {
mojo::ScopedMessagePipeHandle pipe =
mojo::edk::CreateParentMessagePipe(primordial_pipe_token);
- mojo::shell::mojom::CapabilityFilterPtr filter(
- mojo::shell::mojom::CapabilityFilter::New());
- mojo::Array<mojo::String> test_interfaces;
- test_interfaces.push_back("*");
- filter->filter.insert("*", std::move(test_interfaces));
-
mojo::shell::mojom::ShellPtr shell;
connector()->ConnectToInterface("mojo:shell", &shell);
@@ -216,12 +210,10 @@ class LifecycleTest : public mojo::test::ShellTest {
factory.Bind(mojo::InterfacePtrInfo<mojo::shell::mojom::ShellClientFactory>(
std::move(pipe), 0u));
base::RunLoop loop;
- mojo::shell::mojom::IdentityPtr target(mojo::shell::mojom::Identity::New());
- target->name = kTestExeName;
- target->user_id = mojom::kInheritUserID;
- target->instance = "";
- shell->CreateInstance(std::move(factory), std::move(target),
- std::move(filter), std::move(request),
+ mojo::Identity target(kTestExeName, mojom::kInheritUserID);
+ shell->CreateInstance(std::move(factory),
+ mojo::shell::mojom::Identity::From(target),
+ std::move(request),
base::Bind(&LifecycleTest::OnConnectionCompleted,
base::Unretained(this), &loop));
loop.Run();

Powered by Google App Engine
This is Rietveld 408576698