| 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}); | |
| 72 } | 69 } |
| 73 } | 70 } |
| 74 }; | 71 }; |
| 75 | 72 |
| 76 (function (exports) { | 73 (function (exports) { |
| 77 var originalXMLHttpRequest = window.XMLHttpRequest; | 74 var originalXMLHttpRequest = window.XMLHttpRequest; |
| 78 | 75 |
| 79 // Mock XMLHttpRequest. It dispatches a 'load' event immediately with status | 76 // Mock XMLHttpRequest. It dispatches a 'load' event immediately with status |
| 80 // equals to 200 in function |send|. | 77 // equals to 200 in function |send|. |
| 81 function MockXMLHttpRequest() { | 78 function MockXMLHttpRequest() { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 }; | 126 }; |
| 130 | 127 |
| 131 function uninstallMockXMLHttpRequest() { | 128 function uninstallMockXMLHttpRequest() { |
| 132 window['XMLHttpRequest'] = originalXMLHttpRequest; | 129 window['XMLHttpRequest'] = originalXMLHttpRequest; |
| 133 }; | 130 }; |
| 134 | 131 |
| 135 exports.installMockXMLHttpRequest = installMockXMLHttpRequest; | 132 exports.installMockXMLHttpRequest = installMockXMLHttpRequest; |
| 136 exports.uninstallMockXMLHttpRequest = uninstallMockXMLHttpRequest; | 133 exports.uninstallMockXMLHttpRequest = uninstallMockXMLHttpRequest; |
| 137 | 134 |
| 138 })(window); | 135 })(window); |
| OLD | NEW |