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

Unified Diff: remoting/webapp/browser_test/mock_signal_strategy.js

Issue 593313003: Implement basic mocks for testing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer feedback. Created 6 years, 3 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
« no previous file with comments | « remoting/webapp/browser_test/mock_session_connector.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/browser_test/mock_signal_strategy.js
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 0000000000000000000000000000000000000000..2c19b36e938a0b9a691bf5b8449e450412c3a7ec
--- /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 '';
+};
« no previous file with comments | « remoting/webapp/browser_test/mock_session_connector.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698