1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 var onListen = function(result
) {
8 console
.log("Server socket 'listen' completed: sd=" + socketId
+
10 chrome
.test
.assertEq(0, result
);
11 chrome
.test
.succeed();
14 var onCreate = function (socketInfo
) {
15 console
.log("Server socket created: sd=" + socketInfo
.socketId
);
16 socketId
= socketInfo
.socketId
;
17 chrome
.sockets
.tcpServer
.listen(socketId
, '0.0.0.0', 1234, onListen
);
20 chrome
.test
.runTests([
22 chrome
.sockets
.tcpServer
.create({}, onCreate
);