summaryrefslogtreecommitdiffstats
path: root/dom/network/tests/tcpsocket_test.jsm
diff options
context:
space:
mode:
Diffstat (limited to 'dom/network/tests/tcpsocket_test.jsm')
-rw-r--r--dom/network/tests/tcpsocket_test.jsm20
1 files changed, 20 insertions, 0 deletions
diff --git a/dom/network/tests/tcpsocket_test.jsm b/dom/network/tests/tcpsocket_test.jsm
new file mode 100644
index 000000000..837a52262
--- /dev/null
+++ b/dom/network/tests/tcpsocket_test.jsm
@@ -0,0 +1,20 @@
+this.EXPORTED_SYMBOLS = [
+ 'createSocket', 'createServer', 'enablePrefsAndPermissions',
+ 'socketCompartmentInstanceOfArrayBuffer'];
+
+this.createSocket = function(host, port, options) {
+ return new TCPSocket(host, port, options);
+}
+
+this.createServer = function(port, options, backlog) {
+ return new TCPServerSocket(port, options, backlog);
+}
+
+this.enablePrefsAndPermissions = function() {
+ return false;
+}
+
+// See test_tcpsocket_client_and_server_basics.html's version for rationale.
+this.socketCompartmentInstanceOfArrayBuffer = function(obj) {
+ return obj instanceof ArrayBuffer;
+}