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

Side by Side Diff: remoting/webapp/unittests/it2me_service_unittest.js

Issue 473073002: Move hello message from It2MeService to It2MeChannel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One bird per stone Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function() { 5 (function() {
6 6
7 'use strict'; 7 'use strict';
8 8
9 var appLauncher = null; 9 var appLauncher = null;
10 var hangoutPort = null; 10 var hangoutPort = null;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 test('should reject unknown connection', function() { 123 test('should reject unknown connection', function() {
124 it2meService.onWebappConnect_(webappPort); 124 it2meService.onWebappConnect_(webappPort);
125 sinon.assert.called(webappPort.disconnect); 125 sinon.assert.called(webappPort.disconnect);
126 126
127 var randomPort = createPort('unsupported.port.name'); 127 var randomPort = createPort('unsupported.port.name');
128 it2meService.onConnectExternal_(randomPort); 128 it2meService.onConnectExternal_(randomPort);
129 sinon.assert.called(randomPort.disconnect); 129 sinon.assert.called(randomPort.disconnect);
130 }); 130 });
131 131
132 test('messageExternal("hello") should return supportedFeatures', function() {
133 var response = null;
134 function callback(msg) {
135 response = msg;
136 }
137
138 it2meService.onMessageExternal_({
139 method: 'hello'
140 }, null, callback);
141
142 QUnit.ok(response.supportedFeatures instanceof Array);
143 });
144
145 })(); 132 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698