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

Side by Side Diff: chrome/test/data/extensions/api_test/dial/experimental/discovery.js

Issue 11444020: DIAL extension API skeleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: abc.... Created 8 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5 onload = function() {
6 chrome.test.runTests([
7 function discovery() {
8 var discoverNowShouldSucceed = function(result) {
9 if (result)
10 chrome.test.succeed();
11 else
12 chrome.test.fail();
13 };
14
15 var onDeviceList = function(deviceList) {
16 // Unused.
17 };
18
19 var discoverNowShouldFail = function(result) {
20 if (!result) {
21 chrome.test.succeed();
22 chrome.dial.onDeviceList.addListener(onDeviceList);
23 chrome.dial.discoverNow(discoverNowShouldSucceed);
24 } else {
25 chrome.test.fail();
26 }
27 };
28
29 chrome.dial.discoverNow(discoverNowShouldFail);
30 }
31 ]);
32 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698