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 | 5 |
6 var TestConstants = { | 6 var TestConstants = { |
7 wallpaperURL: 'https://test.com/test.jpg', | 7 wallpaperURL: 'https://test.com/test.jpg', |
8 // A dummy string which is used to mock an image. | 8 // A dummy string which is used to mock an image. |
9 image: '*#*@#&' | 9 image: '*#*@#&' |
10 }; | 10 }; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 }, | 59 }, |
60 alarms: { | 60 alarms: { |
61 onAlarm: { | 61 onAlarm: { |
62 addListener: function(listener) { | 62 addListener: function(listener) { |
63 } | 63 } |
64 } | 64 } |
65 }, | 65 }, |
66 wallpaperPrivate: { | 66 wallpaperPrivate: { |
67 getStrings: function(callback) { | 67 getStrings: function(callback) { |
68 callback({isExperimental: false}); | 68 callback({isExperimental: false}); |
| 69 }, |
| 70 getSyncSetting: function(callback) { |
| 71 callback({syncThemes: true}); |
69 } | 72 } |
70 } | 73 } |
71 }; | 74 }; |
72 | 75 |
73 (function (exports) { | 76 (function (exports) { |
74 var originalXMLHttpRequest = window.XMLHttpRequest; | 77 var originalXMLHttpRequest = window.XMLHttpRequest; |
75 | 78 |
76 // Mock XMLHttpRequest. It dispatches a 'load' event immediately with status | 79 // Mock XMLHttpRequest. It dispatches a 'load' event immediately with status |
77 // equals to 200 in function |send|. | 80 // equals to 200 in function |send|. |
78 function MockXMLHttpRequest() { | 81 function MockXMLHttpRequest() { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 }; | 129 }; |
127 | 130 |
128 function uninstallMockXMLHttpRequest() { | 131 function uninstallMockXMLHttpRequest() { |
129 window['XMLHttpRequest'] = originalXMLHttpRequest; | 132 window['XMLHttpRequest'] = originalXMLHttpRequest; |
130 }; | 133 }; |
131 | 134 |
132 exports.installMockXMLHttpRequest = installMockXMLHttpRequest; | 135 exports.installMockXMLHttpRequest = installMockXMLHttpRequest; |
133 exports.uninstallMockXMLHttpRequest = uninstallMockXMLHttpRequest; | 136 exports.uninstallMockXMLHttpRequest = uninstallMockXMLHttpRequest; |
134 | 137 |
135 })(window); | 138 })(window); |
OLD | NEW |