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

Unified Diff: chrome/browser/extensions/api/mdns/mdns_api_unittest.cc

Issue 1463333003: Increase the maximum MDNS device limit from 64 to 2048. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | chrome/common/extensions/api/mdns.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/mdns/mdns_api_unittest.cc
diff --git a/chrome/browser/extensions/api/mdns/mdns_api_unittest.cc b/chrome/browser/extensions/api/mdns/mdns_api_unittest.cc
index fd8d8daac5beb9f61b443d7d03577ba1d62972ac..8522ec307ee915a18cb032703e4016690dd4bebf 100644
--- a/chrome/browser/extensions/api/mdns/mdns_api_unittest.cc
+++ b/chrome/browser/extensions/api/mdns/mdns_api_unittest.cc
@@ -347,8 +347,8 @@ TEST_F(MDnsAPIMaxServicesTest, OnServiceListDoesNotExceedLimit) {
EventRouterFactory::GetInstance()->SetTestingFactory(
browser_context(), &MockEventRouterFactoryFunction);
- // This check should change when the [value=64] changes in the IDL file.
- EXPECT_EQ(64, api::mdns::MAX_SERVICE_INSTANCES_PER_EVENT);
+ // This check should change when the [value=2048] changes in the IDL file.
+ EXPECT_EQ(2048, api::mdns::MAX_SERVICE_INSTANCES_PER_EVENT);
// Dispatch an mDNS event with more service instances than the max, and ensure
// that the list is truncated by inspecting the argument to MockEventRouter's
@@ -357,8 +357,11 @@ TEST_F(MDnsAPIMaxServicesTest, OnServiceListDoesNotExceedLimit) {
for (int i = 0; i < api::mdns::MAX_SERVICE_INSTANCES_PER_EVENT + 10; ++i) {
services.push_back(DnsSdService());
}
- EXPECT_CALL(*event_router(), BroadcastEventPtr(testing::Pointee(
- EventServiceListSize(size_t(64))))).Times(1);
+ EXPECT_CALL(
+ *event_router(),
+ BroadcastEventPtr(testing::Pointee(EventServiceListSize(
+ static_cast<size_t>(api::mdns::MAX_SERVICE_INSTANCES_PER_EVENT)))))
+ .Times(1);
dns_sd_registry()->DispatchMDnsEvent("_testing._tcp.local", services);
}
« no previous file with comments | « no previous file | chrome/common/extensions/api/mdns.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698