Chromium Code Reviews| Index: chrome/test/data/extensions/api_test/cast_channel/api/test_open_error.js |
| =================================================================== |
| --- chrome/test/data/extensions/api_test/cast_channel/api/test_open_error.js (revision 0) |
| +++ chrome/test/data/extensions/api_test/cast_channel/api/test_open_error.js (revision 0) |
| @@ -0,0 +1,20 @@ |
| +// Copyright 2014 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. |
| + |
| +var onClose = function(channel) { |
| + assertClosedChannel(channel); |
| +} |
| + |
| +var onError = function(channel) { |
| + chrome.cast.channel.close(channel, onClose); |
| + chrome.test.notifyPass(); |
| +} |
| + |
| +var onOpen = function(channel) { |
| + assertClosedChannel(channel); |
| + chrome.test.succeed(); |
| +}; |
| + |
| +chrome.cast.channel.onError.addListener(onError); |
| +chrome.cast.channel.open('cast://192.168.1.1:8009', onOpen); |
|
Wez
2014/03/04 21:29:53
Do you mean to use localhost here?
Munjal (Google)
2014/05/21 22:41:06
It does not matter since we don't really do a conn
|