| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 // Mock out the support module to avoid depending on the message loop. | 5 // Mock out the support module to avoid depending on the message loop. |
| 6 define("mojo/public/js/support", ["timer"], function(timer) { | 6 define("mojo/public/js/support", ["timer"], function(timer) { |
| 7 var waitingCallbacks = []; | 7 var waitingCallbacks = []; |
| 8 | 8 |
| 9 function WaitCookie(id) { | 9 function WaitCookie(id) { |
| 10 this.id = id; | 10 this.id = id; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 return exports; | 53 return exports; |
| 54 }); | 54 }); |
| 55 | 55 |
| 56 define([ | 56 define([ |
| 57 "gin/test/expect", | 57 "gin/test/expect", |
| 58 "mojo/public/js/support", | 58 "mojo/public/js/support", |
| 59 "mojo/public/js/core", | 59 "mojo/public/js/core", |
| 60 "mojo/public/js/connection", | 60 "mojo/public/js/connection", |
| 61 "mojo/public/interfaces/bindings/tests/sample_interfaces.mojom", | 61 "mojo/public/interfaces/bindings/tests/sample_interfaces.mojom", |
| 62 "mojo/public/interfaces/bindings/tests/sample_service.mojom", | 62 "mojo/public/interfaces/bindings/tests/sample_service.mojom", |
| 63 "mojo/apps/js/bindings/threading", | 63 "mojo/public/js/threading", |
| 64 "gc", | 64 "gc", |
| 65 ], function(expect, | 65 ], function(expect, |
| 66 mockSupport, | 66 mockSupport, |
| 67 core, | 67 core, |
| 68 connection, | 68 connection, |
| 69 sample_interfaces, | 69 sample_interfaces, |
| 70 sample_service, | 70 sample_service, |
| 71 threading, | 71 threading, |
| 72 gc) { | 72 gc) { |
| 73 testClientServer(); | 73 testClientServer(); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 }).then(function() { | 252 }).then(function() { |
| 253 throw Error("Expected echoString to fail."); | 253 throw Error("Expected echoString to fail."); |
| 254 }, function(error) { | 254 }, function(error) { |
| 255 expect(error.message).toBe("Connection error: " + core.RESULT_UNKNOWN); | 255 expect(error.message).toBe("Connection error: " + core.RESULT_UNKNOWN); |
| 256 | 256 |
| 257 // Clean up. | 257 // Clean up. |
| 258 core.readMessage = origReadMessage; | 258 core.readMessage = origReadMessage; |
| 259 }); | 259 }); |
| 260 } | 260 } |
| 261 }); | 261 }); |
| OLD | NEW |