1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 function discoverySucceeds() {
8 var discoverNowCallback = function(result) {
9 chrome.test.assertNoLastError();
10 // The result may be true or false depending on whether periodic
11 // discovery is running at the same time.
12 // TODO(mfoltz): We may want to update the API to distinguish error cases
13 // from simultaneous discovery.
14 chrome.test.assertTrue(typeof(result) == 'boolean');
15 chrome.test.succeed();
17 chrome.dial.onDeviceList.addListener(function(deviceList) {});
18 chrome.dial.discoverNow(discoverNowCallback);