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

Unified Diff: chrome/test/data/extensions/api_test/mdns/api/register_multiple_listeners.js

Issue 23437015: Initial chrome.mdns API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable test for WinDbg Created 7 years, 3 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: chrome/test/data/extensions/api_test/mdns/api/register_multiple_listeners.js
diff --git a/chrome/test/data/extensions/api_test/mdns/api/register_multiple_listeners.js b/chrome/test/data/extensions/api_test/mdns/api/register_multiple_listeners.js
new file mode 100644
index 0000000000000000000000000000000000000000..ef7611d9796ffb8662fe4b67816a32245ffe40dc
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/mdns/api/register_multiple_listeners.js
@@ -0,0 +1,23 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+onload = function() {
+ chrome.test.runTests([
+ function registerListeners() {
+ var numEvents = 0;
+ chrome.mdns.onServiceList.addListener(function(services) {
+ if (numEvents++ == 1) {
+ chrome.test.succeed();
+ }
+ }, {'serviceType': '_googlecast._tcp.local'});
+
+ chrome.mdns.onServiceList.addListener(function(services) {
+ if (numEvents++ == 1) {
+ chrome.test.succeed();
+ }
+ }, {'serviceType': '_testing._tcp.local'});
+ chrome.test.notifyPass();
+ }
+ ]);
+};

Powered by Google App Engine
This is Rietveld 408576698