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

Unified Diff: chrome/test/data/extensions/api_test/cast_channel/api/test_open_error.js

Issue 165293002: Add an API test to exersize the open error case. This is a regression test for (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 10 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/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

Powered by Google App Engine
This is Rietveld 408576698