| 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/edk/js/tests/js_to_cpp_tests', [ | 5 define('mojo/edk/js/tests/js_to_cpp_tests', [ |
| 6 'console', | 6 'console', |
| 7 'mojo/edk/js/tests/js_to_cpp.mojom', | 7 'mojo/edk/js/tests/js_to_cpp.mojom', |
| 8 'mojo/public/js/bindings', | 8 'mojo/public/js/bindings', |
| 9 'mojo/public/js/connector', | 9 'mojo/public/js/connector', |
| 10 'mojo/public/js/core', | 10 'mojo/public/js/core', |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 } | 107 } |
| 108 stopSignalled = true; | 108 stopSignalled = true; |
| 109 return false; | 109 return false; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 while (!stopSignalled) { | 112 while (!stopSignalled) { |
| 113 messagePipe = core.createMessagePipe(); | 113 messagePipe = core.createMessagePipe(); |
| 114 writeMessagePipe(messagePipe, sampleMessage); | 114 writeMessagePipe(messagePipe, sampleMessage); |
| 115 arg.message_handle = messagePipe.handle1; | 115 arg.message_handle = messagePipe.handle1; |
| 116 | 116 |
| 117 this.cppSide_.bitFlipResponse(createEchoArgsList(arg)); | 117 this.cppSide_.bitFlipResponse(createEchoArgsList(arg), null); |
| 118 | 118 |
| 119 core.close(messagePipe.handle0); | 119 core.close(messagePipe.handle0); |
| 120 iteration += 1; | 120 iteration += 1; |
| 121 } | 121 } |
| 122 | 122 |
| 123 proto.accept = proto.realAccept; | 123 proto.accept = proto.realAccept; |
| 124 proto.realAccept = null; | 124 proto.realAccept = null; |
| 125 this.cppSide_.testFinished(); | 125 this.cppSide_.testFinished(); |
| 126 }; | 126 }; |
| 127 | 127 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 sampleData[i] = i; | 206 sampleData[i] = i; |
| 207 } | 207 } |
| 208 sampleMessage = new Uint8Array(DATA_PIPE_PARAMS.capacityNumBytes); | 208 sampleMessage = new Uint8Array(DATA_PIPE_PARAMS.capacityNumBytes); |
| 209 for (i = 0; i < sampleMessage.length; ++i) { | 209 for (i = 0; i < sampleMessage.length; ++i) { |
| 210 sampleMessage[i] = 255 - i; | 210 sampleMessage[i] = 255 - i; |
| 211 } | 211 } |
| 212 retainedJsSide = new JsSideConnection; | 212 retainedJsSide = new JsSideConnection; |
| 213 retainedJsSide.binding.bind(jsSideRequestHandle); | 213 retainedJsSide.binding.bind(jsSideRequestHandle); |
| 214 }; | 214 }; |
| 215 }); | 215 }); |
| OLD | NEW |