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 // This file contains various mock objects for the chrome platform to make | 5 // This file contains various mock objects for the chrome platform to make |
6 // unit testing easier. | 6 // unit testing easier. |
7 | 7 |
| 8 Entry = function() {}; |
| 9 |
8 (function(scope){ | 10 (function(scope){ |
9 | 11 |
10 var chromeMocks = {}; | 12 var chromeMocks = {}; |
11 | 13 |
12 chromeMocks.Event = function() { | 14 chromeMocks.Event = function() { |
13 this.listeners_ = []; | 15 this.listeners_ = []; |
14 }; | 16 }; |
15 | 17 |
16 chromeMocks.Event.prototype.addListener = function(callback) { | 18 chromeMocks.Event.prototype.addListener = function(callback) { |
17 this.listeners_.push(callback); | 19 this.listeners_.push(callback); |
(...skipping 23 matching lines...) Expand all Loading... |
41 this.name = ''; | 43 this.name = ''; |
42 this.sender = null; | 44 this.sender = null; |
43 }; | 45 }; |
44 | 46 |
45 chromeMocks.runtime.Port.prototype.disconnect = function() {}; | 47 chromeMocks.runtime.Port.prototype.disconnect = function() {}; |
46 chromeMocks.runtime.Port.prototype.postMessage = function() {}; | 48 chromeMocks.runtime.Port.prototype.postMessage = function() {}; |
47 | 49 |
48 scope.chromeMocks = chromeMocks; | 50 scope.chromeMocks = chromeMocks; |
49 | 51 |
50 })(window); | 52 })(window); |
OLD | NEW |