diff options
author | jamiewalch <jamiewalch@chromium.org> | 2014-09-24 19:10:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-25 02:10:29 +0000 |
commit | 8e0666d30aeb18d0672ca7ab6a9867ee97da159b (patch) | |
tree | 7809c8a2263a23daf1dc7543839d6b9d9085a3fb /remoting/webapp/browser_test/mock_signal_strategy.js | |
parent | 32977338f1cd4b588d4244e49860f35bdda7c3a6 (diff) | |
download | chromium_src-8e0666d30aeb18d0672ca7ab6a9867ee97da159b.zip chromium_src-8e0666d30aeb18d0672ca7ab6a9867ee97da159b.tar.gz chromium_src-8e0666d30aeb18d0672ca7ab6a9867ee97da159b.tar.bz2 |
Implement basic mocks for testing.
These may need to be made more elaborate once we start using them in
browser tests, but I've verified that they can be used to mock a basic
connection with resize support.
Review URL: https://codereview.chromium.org/593313003
Cr-Commit-Position: refs/heads/master@{#296624}
Diffstat (limited to 'remoting/webapp/browser_test/mock_signal_strategy.js')
-rw-r--r-- | remoting/webapp/browser_test/mock_signal_strategy.js | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/remoting/webapp/browser_test/mock_signal_strategy.js b/remoting/webapp/browser_test/mock_signal_strategy.js new file mode 100644 index 0000000..2c19b36 --- /dev/null +++ b/remoting/webapp/browser_test/mock_signal_strategy.js @@ -0,0 +1,41 @@ +// 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. + +/** + * @fileoverview + * @suppress {checkTypes} + */ + +'use strict'; + +/** @suppress {duplicate} */ +var remoting = remoting || {}; + +/** + * @constructor + * @implements {remoting.SignalStrategy} + */ +remoting.MockSignalStrategy = function() {}; + +remoting.MockSignalStrategy.prototype.dispose = function() {}; + +remoting.MockSignalStrategy.prototype.setIncomingStanzaCallback = + function(onIncomingStanzaCallback) {}; + +remoting.MockSignalStrategy.prototype.connect = + function(server, username, authToken) {}; + +remoting.MockSignalStrategy.prototype.sendMessage = function(message) {}; + +remoting.MockSignalStrategy.prototype.getState = function() { + return remoting.SignalStrategy.State.CONNECTED; +}; + +remoting.MockSignalStrategy.prototype.getError = function() { + return remoting.Error.NONE; +}; + +remoting.MockSignalStrategy.prototype.getJid = function() { + return ''; +}; |