summaryrefslogtreecommitdiffstats
path: root/dom/network
diff options
context:
space:
mode:
Diffstat (limited to 'dom/network')
-rw-r--r--dom/network/tests/test_tcpsocket_client_and_server_basics.js8
-rw-r--r--dom/network/tests/test_udpsocket.html18
2 files changed, 13 insertions, 13 deletions
diff --git a/dom/network/tests/test_tcpsocket_client_and_server_basics.js b/dom/network/tests/test_tcpsocket_client_and_server_basics.js
index bbb91e410f..32b290a949 100644
--- a/dom/network/tests/test_tcpsocket_client_and_server_basics.js
+++ b/dom/network/tests/test_tcpsocket_client_and_server_basics.js
@@ -129,7 +129,7 @@ function listenForEventsOnSocket(socket, socketType) {
}
dump("(" + socketType + " waiting for event)\n");
- return new Promise(function (resolve, reject) {
+ return new Promise(function (resolve) {
pendingResolve = resolve;
});
},
@@ -149,7 +149,7 @@ function listenForEventsOnSocket(socket, socketType) {
return promise;
}
dump("(" + socketType + " waiting for " + length + " bytes)\n");
- return new Promise(function (resolve, reject) {
+ return new Promise(function (resolve) {
pendingResolve = resolve;
wantDataLength = length;
});
@@ -159,7 +159,7 @@ function listenForEventsOnSocket(socket, socketType) {
throw new Error("only one wait allowed at a time.");
}
- return new Promise(function (resolve, reject) {
+ return new Promise(function (resolve) {
pendingResolve = resolve;
// we may receive no data before getting close, in which case we want to
// return an empty array
@@ -177,7 +177,7 @@ function listenForEventsOnSocket(socket, socketType) {
* to add the event listener during the connection.
*/
function waitForConnection(listeningServer) {
- return new Promise(function (resolve, reject) {
+ return new Promise(function (resolve) {
// Because of the event model of sockets, we can't use the
// listenForEventsOnSocket mechanism; we need to hook up listeners during
// the connect event.
diff --git a/dom/network/tests/test_udpsocket.html b/dom/network/tests/test_udpsocket.html
index 1ca42f2432..f465c1727f 100644
--- a/dom/network/tests/test_udpsocket.html
+++ b/dom/network/tests/test_udpsocket.html
@@ -74,7 +74,7 @@ function testSendString(socket) {
socket.send(HELLO_WORLD, '127.0.0.1', socket.localPort);
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
socket.addEventListener('message', function(msg) {
let recvData= String.fromCharCode.apply(null, new Uint8Array(msg.data));
is(msg.remotePort, socket.localPort, 'expected packet from ' + socket.localPort);
@@ -89,7 +89,7 @@ function testSendArrayBuffer(socket) {
socket.send(DATA_ARRAY_BUFFER, '127.0.0.1', socket.localPort);
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
socket.addEventListener('message', function(msg) {
is(msg.remotePort, socket.localPort, 'expected packet from ' + socket.localPort);
ok(is_same_buffer(msg.data, DATA_ARRAY_BUFFER), 'expected same buffer data');
@@ -103,7 +103,7 @@ function testSendArrayBufferView(socket) {
socket.send(TYPED_DATA_ARRAY, '127.0.0.1', socket.localPort);
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
socket.addEventListener('message', function(msg) {
is(msg.remotePort, socket.localPort, 'expected packet from ' + socket.localPort);
ok(is_same_buffer(msg.data, TYPED_DATA_ARRAY), 'expected same buffer data');
@@ -118,7 +118,7 @@ function testSendBlob(socket) {
let blob = new Blob([HELLO_WORLD], {type : 'text/plain'});
socket.send(blob, '127.0.0.1', socket.localPort);
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
socket.addEventListener('message', function(msg) {
let recvData= String.fromCharCode.apply(null, new Uint8Array(msg.data));
is(msg.remotePort, socket.localPort, 'expected packet from ' + socket.localPort);
@@ -133,7 +133,7 @@ function testSendBigArray(socket) {
socket.send(BIG_TYPED_ARRAY, '127.0.0.1', socket.localPort);
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
let byteReceived = 0;
socket.addEventListener('message', function recv_callback(msg) {
let byteBegin = byteReceived;
@@ -154,7 +154,7 @@ function testSendBigBlob(socket) {
let blob = new Blob([BIG_TYPED_ARRAY]);
socket.send(blob, '127.0.0.1', socket.localPort);
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
let byteReceived = 0;
socket.addEventListener('message', function recv_callback(msg) {
let byteBegin = byteReceived;
@@ -185,7 +185,7 @@ function testUDPOptions(socket) {
return remoteSocket.opened.then(function() {
remoteSocket.send(HELLO_WORLD);
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
socket.addEventListener('message', function(msg) {
let recvData= String.fromCharCode.apply(null, new Uint8Array(msg.data));
is(msg.remotePort, remoteSocket.localPort, 'expected packet from ' + remoteSocket.localPort);
@@ -224,7 +224,7 @@ function testMulticast() {
return socket.opened.then(function() {
socket.send(HELLO_WORLD, MCAST_ADDRESS, socket.localPort);
- return new Promise(function(resolve, reject) {
+ return new Promise(function(resolve) {
socket.addEventListener('message', function(msg) {
let recvData= String.fromCharCode.apply(null, new Uint8Array(msg.data));
is(msg.remotePort, socket.localPort, 'expected packet from ' + socket.localPort);
@@ -344,7 +344,7 @@ async function testBFCache() {
socket.send(HELLO_WORLD, '127.0.0.1', msg.remotePort);
await new Promise(resolve => {
- function recv_again_callback(message) {
+ function recv_again_callback() {
socket.removeEventListener('message', recv_again_callback);
ok(false, 'should not receive packet after page unload');
}