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

Side by Side Diff: remoting/webapp/browser_test/mock_client_plugin.js

Issue 954373002: [Webapp Refactor] Group authentications fields into remoting.CredentialsProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove supports() Created 5 years, 9 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
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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Mock implementation of ClientPlugin for testing. 7 * Mock implementation of ClientPlugin for testing.
8 * @suppress {checkTypes} 8 * @suppress {checkTypes}
9 */ 9 */
10 10
(...skipping 28 matching lines...) Expand all
39 }; 39 };
40 40
41 remoting.MockClientPlugin.prototype.element = function() { 41 remoting.MockClientPlugin.prototype.element = function() {
42 return this.element_; 42 return this.element_;
43 }; 43 };
44 44
45 remoting.MockClientPlugin.prototype.initialize = function(onDone) { 45 remoting.MockClientPlugin.prototype.initialize = function(onDone) {
46 window.setTimeout(onDone.bind(null, true), 0); 46 window.setTimeout(onDone.bind(null, true), 0);
47 }; 47 };
48 48
49 remoting.MockClientPlugin.prototype.connect = function( 49
50 hostJid, hostPublicKey, localJid, sharedSecret, 50 remoting.MockClientPlugin.prototype.connect =
51 authenticationMethods, authenticationTag, 51 function(host, localJid, credentialsProvider) {
52 clientPairingId, clientPairedSecret) {
53 base.debug.assert(this.connectionStatusUpdateHandler_ != null); 52 base.debug.assert(this.connectionStatusUpdateHandler_ != null);
54 window.setTimeout( 53 window.setTimeout(
55 this.connectionStatusUpdateHandler_.bind( 54 this.connectionStatusUpdateHandler_.bind(
56 this, 55 this,
57 remoting.ClientSession.State.CONNECTED, 56 remoting.ClientSession.State.CONNECTED,
58 remoting.ClientSession.ConnectionError.NONE), 57 remoting.ClientSession.ConnectionError.NONE),
59 0); 58 0);
60 }; 59 };
61 60
62 remoting.MockClientPlugin.prototype.injectKeyEvent = 61 remoting.MockClientPlugin.prototype.injectKeyEvent =
63 function(key, down) {}; 62 function(key, down) {};
64 63
65 remoting.MockClientPlugin.prototype.remapKey = function(from, to) {}; 64 remoting.MockClientPlugin.prototype.remapKey = function(from, to) {};
66 65
67 remoting.MockClientPlugin.prototype.releaseAllKeys = function() {}; 66 remoting.MockClientPlugin.prototype.releaseAllKeys = function() {};
68 67
69 remoting.MockClientPlugin.prototype.onIncomingIq = function(iq) {}; 68 remoting.MockClientPlugin.prototype.onIncomingIq = function(iq) {};
70 69
71 remoting.MockClientPlugin.prototype.isSupportedVersion = function() { 70 remoting.MockClientPlugin.prototype.isSupportedVersion = function() {
72 return true; 71 return true;
73 }; 72 };
74 73
75 remoting.MockClientPlugin.prototype.hasFeature = function(feature) { 74 remoting.MockClientPlugin.prototype.hasFeature = function(feature) {
76 return false; 75 return false;
77 }; 76 };
78 77
79 remoting.MockClientPlugin.prototype.sendClipboardItem = 78 remoting.MockClientPlugin.prototype.sendClipboardItem =
80 function(mimeType, item) {}; 79 function(mimeType, item) {};
81 80
82 remoting.MockClientPlugin.prototype.useAsyncPinDialog = function() {};
83
84 remoting.MockClientPlugin.prototype.requestPairing = 81 remoting.MockClientPlugin.prototype.requestPairing =
85 function(clientName, onDone) {}; 82 function(clientName, onDone) {};
86 83
87 remoting.MockClientPlugin.prototype.onPinFetched = function(pin) {};
88
89 remoting.MockClientPlugin.prototype.onThirdPartyTokenFetched =
90 function(token, sharedSecret) {};
91
92 remoting.MockClientPlugin.prototype.pauseAudio = function(pause) {}; 84 remoting.MockClientPlugin.prototype.pauseAudio = function(pause) {};
93 85
94 remoting.MockClientPlugin.prototype.pauseVideo = function(pause) {}; 86 remoting.MockClientPlugin.prototype.pauseVideo = function(pause) {};
95 87
96 remoting.MockClientPlugin.prototype.getPerfStats = function() { 88 remoting.MockClientPlugin.prototype.getPerfStats = function() {
97 var result = new remoting.ClientSession.PerfStats; 89 var result = new remoting.ClientSession.PerfStats;
98 result.videoBandwidth = 999; 90 result.videoBandwidth = 999;
99 result.videoFrameRate = 60; 91 result.videoFrameRate = 60;
100 result.captureLatency = 10; 92 result.captureLatency = 10;
101 result.encodeLatency = 10; 93 result.encodeLatency = 10;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 127
136 remoting.MockClientPlugin.prototype.setGnubbyAuthHandler = 128 remoting.MockClientPlugin.prototype.setGnubbyAuthHandler =
137 function(handler) {}; 129 function(handler) {};
138 130
139 remoting.MockClientPlugin.prototype.setCastExtensionHandler = 131 remoting.MockClientPlugin.prototype.setCastExtensionHandler =
140 function(handler) {}; 132 function(handler) {};
141 133
142 remoting.MockClientPlugin.prototype.setMouseCursorHandler = 134 remoting.MockClientPlugin.prototype.setMouseCursorHandler =
143 function(handler) {}; 135 function(handler) {};
144 136
145 remoting.MockClientPlugin.prototype.setFetchThirdPartyTokenHandler =
146 function(handler) {};
147
148 remoting.MockClientPlugin.prototype.setFetchPinHandler =
149 function(handler) {};
150
151 /** 137 /**
152 * @constructor 138 * @constructor
153 * @implements {remoting.HostDesktop} 139 * @implements {remoting.HostDesktop}
154 * @extends {base.EventSourceImpl} 140 * @extends {base.EventSourceImpl}
155 */ 141 */
156 remoting.MockClientPlugin.HostDesktop = function() { 142 remoting.MockClientPlugin.HostDesktop = function() {
157 /** @private */ 143 /** @private */
158 this.width_ = 0; 144 this.width_ = 0;
159 /** @private */ 145 /** @private */
160 this.height_ = 0; 146 this.height_ = 0;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 * @extends {remoting.ClientPluginFactory} 195 * @extends {remoting.ClientPluginFactory}
210 */ 196 */
211 remoting.MockClientPluginFactory = function() {}; 197 remoting.MockClientPluginFactory = function() {};
212 198
213 remoting.MockClientPluginFactory.prototype.createPlugin = 199 remoting.MockClientPluginFactory.prototype.createPlugin =
214 function(container, onExtensionMessage) { 200 function(container, onExtensionMessage) {
215 return new remoting.MockClientPlugin(container); 201 return new remoting.MockClientPlugin(container);
216 }; 202 };
217 203
218 remoting.MockClientPluginFactory.prototype.preloadPlugin = function() {}; 204 remoting.MockClientPluginFactory.prototype.preloadPlugin = function() {};
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698