| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2014 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /* globals ASSERT_EQ, EXPECT_EQ, EXPECT_TRUE, chrometest */ |
| 8 |
| 7 'use strict'; | 9 'use strict'; |
| 8 | 10 |
| 9 function DevEnvTest() { | 11 function DevEnvTest() { |
| 10 chrometest.Test.call(this); | 12 chrometest.Test.call(this); |
| 11 this.devEnv = null; | 13 this.devEnv = null; |
| 12 this.tcp = null; | 14 this.tcp = null; |
| 13 this.params = chrometest.getUrlParameters(); | 15 this.params = chrometest.getUrlParameters(); |
| 14 | 16 |
| 15 // Buffer incoming TCP messages. | 17 // Buffer incoming TCP messages. |
| 16 this.tcpBuffer = {}; | 18 this.tcpBuffer = {}; |
| 17 this.tcpDisconnected = {}; | 19 this.tcpDisconnected = {}; |
| 18 }; | 20 } |
| 19 | 21 |
| 20 DevEnvTest.prototype = new chrometest.Test(); | 22 DevEnvTest.prototype = new chrometest.Test(); |
| 21 DevEnvTest.prototype.constructor = DevEnvTest; | 23 DevEnvTest.prototype.constructor = DevEnvTest; |
| 22 | 24 |
| 23 DevEnvTest.prototype.setUp = function() { | 25 DevEnvTest.prototype.setUp = function() { |
| 24 var self = this; | 26 var self = this; |
| 25 return Promise.resolve().then(function() { | 27 return Promise.resolve().then(function() { |
| 26 return chrometest.Test.prototype.setUp.call(self); | 28 return chrometest.Test.prototype.setUp.call(self); |
| 27 }).then(function() { | 29 }).then(function() { |
| 28 return chrometest.proxyExtension('NaCl Development Environment'); | 30 return chrometest.proxyExtension('NaCl Development Environment'); |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 * Close a TCP connection. | 403 * Close a TCP connection. |
| 402 * @param {number} socket The TCP socket. | 404 * @param {number} socket The TCP socket. |
| 403 * @returns {Promise} | 405 * @returns {Promise} |
| 404 */ | 406 */ |
| 405 DevEnvTest.prototype.tcpClose = function(socket) { | 407 DevEnvTest.prototype.tcpClose = function(socket) { |
| 406 return this.tcpExec_({ | 408 return this.tcpExec_({ |
| 407 name: 'tcp_close', | 409 name: 'tcp_close', |
| 408 socket: socket | 410 socket: socket |
| 409 }); | 411 }); |
| 410 }; | 412 }; |
| OLD | NEW |