| Index: mojo/shell/tests/application_manager_unittest.cc
|
| diff --git a/mojo/shell/tests/application_manager_unittest.cc b/mojo/shell/tests/application_manager_unittest.cc
|
| index 98e4d8f55a36704af7e4a3084d20dac73db76e09..ac4133d9614d879401e6107be9a589458f94225d 100644
|
| --- a/mojo/shell/tests/application_manager_unittest.cc
|
| +++ b/mojo/shell/tests/application_manager_unittest.cc
|
| @@ -37,9 +37,13 @@ struct TestContext {
|
| int num_loader_deletes;
|
| };
|
|
|
| -void QuitClosure(bool* value) {
|
| - *value = true;
|
| - base::MessageLoop::current()->QuitWhenIdle();
|
| +void QuitClosure(const Identity& expected,
|
| + bool* value,
|
| + const Identity& actual) {
|
| + if (expected == actual) {
|
| + *value = true;
|
| + base::MessageLoop::current()->QuitWhenIdle();
|
| + }
|
| }
|
|
|
| class TestServiceImpl : public TestService {
|
| @@ -597,8 +601,8 @@ TEST_F(ApplicationManagerTest, TestEndApplicationClosure) {
|
| bool called = false;
|
| scoped_ptr<ConnectParams> params(new ConnectParams);
|
| params->SetTargetURL(GURL("test:test"));
|
| - params->set_on_application_end(
|
| - base::Bind(&QuitClosure, base::Unretained(&called)));
|
| + application_manager_->SetInstanceQuitCallback(
|
| + base::Bind(&QuitClosure, params->target(), &called));
|
| application_manager_->Connect(std::move(params));
|
| loop_.Run();
|
| EXPECT_TRUE(called);
|
|
|