Lines Matching refs:socket
25 sinon.stub(chrome.socket, 'create');
26 sinon.stub(chrome.socket, 'connect');
27 sinon.stub(chrome.socket, 'write');
28 sinon.stub(chrome.socket, 'read');
29 sinon.stub(chrome.socket, 'destroy');
30 sinon.stub(chrome.socket, 'secure');
37 chrome.socket.create.restore();
38 chrome.socket.connect.restore();
39 chrome.socket.write.restore();
40 chrome.socket.read.restore();
41 chrome.socket.destroy.restore();
42 chrome.socket.secure.restore();
51 sinon.assert.calledWith(chrome.socket.create, "tcp", {});
52 chrome.socket.create.getCall(0).args[2]({socketId: socketId});
55 chrome.socket.connect, socketId, "xmpp.example.com", 123);
56 chrome.socket.connect.getCall(0).args[3](-1);
67 sinon.assert.calledWith(chrome.socket.create, "tcp", {});
68 chrome.socket.create.getCall(0).args[2]({socketId: socketId});
71 chrome.socket.connect, socketId, "xmpp.example.com", 123);
72 chrome.socket.connect.getCall(0).args[3](0);
88 sinon.assert.calledWith(chrome.socket.read, socketId);
90 chrome.socket.read.getCall(0).args[1]({resultCode: 0, data: data});