OLD | NEW |
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 Loading... |
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 })(); |
OLD | NEW |