| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 define('mojo/apps/js/test/js_to_cpp_unittest', [ | 5 define('mojo/apps/js/test/js_to_cpp_unittest', [ |
| 6 'console', | 6 'console', |
| 7 'mojo/apps/js/test/js_to_cpp.mojom', | 7 'mojo/apps/js/test/js_to_cpp.mojom', |
| 8 'mojo/public/js/bindings/connection', | 8 'mojo/public/js/connection', |
| 9 'mojo/public/js/bindings/connector', | 9 'mojo/public/js/connector', |
| 10 'mojo/public/js/bindings/core', | 10 'mojo/public/js/core', |
| 11 ], function (console, jsToCpp, connection, connector, core) { | 11 ], function (console, jsToCpp, connection, connector, core) { |
| 12 var retainedConnection; | 12 var retainedConnection; |
| 13 var sampleData; | 13 var sampleData; |
| 14 var sampleMessage; | 14 var sampleMessage; |
| 15 var BAD_VALUE = 13; | 15 var BAD_VALUE = 13; |
| 16 var DATA_PIPE_PARAMS = { | 16 var DATA_PIPE_PARAMS = { |
| 17 flags: core.CREATE_DATA_PIPE_OPTIONS_FLAG_NONE, | 17 flags: core.CREATE_DATA_PIPE_OPTIONS_FLAG_NONE, |
| 18 elementNumBytes: 1, | 18 elementNumBytes: 1, |
| 19 capacityNumBytes: 64 | 19 capacityNumBytes: 64 |
| 20 }; | 20 }; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 sampleData[i] = i; | 212 sampleData[i] = i; |
| 213 } | 213 } |
| 214 sampleMessage = new Uint8Array(DATA_PIPE_PARAMS.capacityNumBytes); | 214 sampleMessage = new Uint8Array(DATA_PIPE_PARAMS.capacityNumBytes); |
| 215 for (i = 0; i < sampleMessage.length; ++i) { | 215 for (i = 0; i < sampleMessage.length; ++i) { |
| 216 sampleMessage[i] = 255 - i; | 216 sampleMessage[i] = 255 - i; |
| 217 } | 217 } |
| 218 retainedConnection = new connection.Connection(handle, JsSideConnection, | 218 retainedConnection = new connection.Connection(handle, JsSideConnection, |
| 219 jsToCpp.CppSide.proxyClass); | 219 jsToCpp.CppSide.proxyClass); |
| 220 }; | 220 }; |
| 221 }); | 221 }); |
| OLD | NEW |