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

Unified Diff: mojo/shell/package_manager/content_handler_unittest.cc

Issue 1578473002: Pass application ids via AcceptConnection & ConnectToApplication callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 11 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/application_manager_apptests.mojom ('k') | mojo/shell/package_manager/package_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/package_manager/content_handler_unittest.cc
diff --git a/mojo/shell/package_manager/content_handler_unittest.cc b/mojo/shell/package_manager/content_handler_unittest.cc
index 1beac34d86fe36a1d11a2f404108d38b9dc2625e..64cfa74dfcc4dc5b5e68cf38d96650b64f3a3a11 100644
--- a/mojo/shell/package_manager/content_handler_unittest.cc
+++ b/mojo/shell/package_manager/content_handler_unittest.cc
@@ -225,13 +225,14 @@ TEST_F(ContentHandlerTest,
new ConnectToApplicationParams);
params->set_source(Identity(requestor_url_));
params->SetTargetURL(GURL("test:test"));
- params->set_connect_callback([&content_handler_id, &run_loop](uint32_t t) {
+ params->set_connect_callback(
+ [&content_handler_id, &run_loop](uint32_t, uint32_t t) {
content_handler_id = t;
run_loop.Quit();
});
application_manager_->ConnectToApplication(std::move(params));
run_loop.Run();
- EXPECT_NE(Shell::kInvalidContentHandlerID, content_handler_id);
+ EXPECT_NE(Shell::kInvalidApplicationID, content_handler_id);
}
uint32_t content_handler_id2;
@@ -241,13 +242,14 @@ TEST_F(ContentHandlerTest,
new ConnectToApplicationParams);
params->set_source(Identity(requestor_url_));
params->SetTargetURL(GURL("test:test"));
- params->set_connect_callback([&content_handler_id2, &run_loop](uint32_t t) {
+ params->set_connect_callback(
+ [&content_handler_id2, &run_loop](uint32_t, uint32_t t) {
content_handler_id2 = t;
run_loop.Quit();
});
application_manager_->ConnectToApplication(std::move(params));
run_loop.Run();
- EXPECT_NE(Shell::kInvalidContentHandlerID, content_handler_id2);
+ EXPECT_NE(Shell::kInvalidApplicationID, content_handler_id2);
}
EXPECT_EQ(content_handler_id, content_handler_id2);
}
@@ -265,13 +267,14 @@ TEST_F(ContentHandlerTest, DifferedContentHandlersGetDifferentIDs) {
new ConnectToApplicationParams);
params->set_source(Identity(requestor_url_));
params->SetTargetURL(GURL("test:test"));
- params->set_connect_callback([&content_handler_id, &run_loop](uint32_t t) {
+ params->set_connect_callback(
+ [&content_handler_id, &run_loop](uint32_t, uint32_t t) {
content_handler_id = t;
run_loop.Quit();
});
application_manager_->ConnectToApplication(std::move(params));
run_loop.Run();
- EXPECT_NE(Shell::kInvalidContentHandlerID, content_handler_id);
+ EXPECT_NE(Shell::kInvalidApplicationID, content_handler_id);
}
const std::string mime_type2 = "test/mime-type2";
@@ -292,13 +295,14 @@ TEST_F(ContentHandlerTest, DifferedContentHandlersGetDifferentIDs) {
new ConnectToApplicationParams);
params->set_source(Identity(requestor_url_));
params->SetTargetURL(GURL("test2:test2"));
- params->set_connect_callback([&content_handler_id2, &run_loop](uint32_t t) {
+ params->set_connect_callback(
+ [&content_handler_id2, &run_loop](uint32_t, uint32_t t) {
content_handler_id2 = t;
run_loop.Quit();
});
application_manager_->ConnectToApplication(std::move(params));
run_loop.Run();
- EXPECT_NE(Shell::kInvalidContentHandlerID, content_handler_id2);
+ EXPECT_NE(Shell::kInvalidApplicationID, content_handler_id2);
}
EXPECT_NE(content_handler_id, content_handler_id2);
}
@@ -314,7 +318,7 @@ TEST_F(ContentHandlerTest,
new ConnectToApplicationParams);
params->SetTargetURL(GURL("test:test"));
params->set_connect_callback(
- [&content_handler_id](uint32_t t) { content_handler_id = t; });
+ [&content_handler_id](uint32_t, uint32_t t) { content_handler_id = t; });
application_manager_->ConnectToApplication(std::move(params));
EXPECT_EQ(0u, content_handler_id);
}
« no previous file with comments | « mojo/shell/application_manager_apptests.mojom ('k') | mojo/shell/package_manager/package_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698