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

Side by Side Diff: chrome/browser/extensions/api/mdns/mdns_apitest.cc

Issue 1040773002: Limit number of service instances passed to onServiceList listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add testing:: prefix before MakeMatcher to fix windows build Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/extensions/api/mdns/mdns_api.h" 6 #include "chrome/browser/extensions/api/mdns/mdns_api.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/common/extensions/api/mdns.h" 9 #include "chrome/common/extensions/api/mdns.h"
10 #include "extensions/common/switches.h" 10 #include "extensions/common/switches.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 .Times(10); 158 .Times(10);
159 EXPECT_CALL(*dns_sd_registry_, UnregisterDnsSdListener(A<std::string>())) 159 EXPECT_CALL(*dns_sd_registry_, UnregisterDnsSdListener(A<std::string>()))
160 .Times(10); 160 .Times(10);
161 EXPECT_CALL(*dns_sd_registry_, 161 EXPECT_CALL(*dns_sd_registry_,
162 RemoveObserver(A<extensions::DnsSdRegistry::DnsSdObserver*>())) 162 RemoveObserver(A<extensions::DnsSdRegistry::DnsSdObserver*>()))
163 .Times(1); 163 .Times(1);
164 164
165 EXPECT_TRUE(RunPlatformAppTest("mdns/api-packaged-apps")) 165 EXPECT_TRUE(RunPlatformAppTest("mdns/api-packaged-apps"))
166 << message_; 166 << message_;
167 } 167 }
168
169 // TODO(justinlin): Win Dbg has a workaround that makes RunExtensionSubtest
170 // always return true without actually running the test. Remove when fixed.
171 #if defined(OS_WIN) && !defined(NDEBUG)
172 #define MAYBE_MaxServiceInstancesPerEventConst \
173 DISABLED_MaxServiceInstancesPerEventConst
174 #else
175 #define MAYBE_MaxServiceInstancesPerEventConst MaxServiceInstancesPerEventConst
176 #endif
177 // Test loading extension and registering multiple listeners.
178 IN_PROC_BROWSER_TEST_F(MDnsAPITest, MAYBE_MaxServiceInstancesPerEventConst) {
179 EXPECT_TRUE(RunExtensionSubtest("mdns/api",
180 "get_max_service_instances.html"));
181 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/mdns/mdns_api_unittest.cc ('k') | chrome/common/extensions/api/mdns.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698