| 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 setCustomWallpaper: function(data, layout, isGenerateThumbnail, fileName, |
| 71 callback) { |
| 69 } | 72 } |
| 73 }, |
| 74 runtime: { |
| 75 lastError: null |
| 70 } | 76 } |
| 71 }; | 77 }; |
| 72 | 78 |
| 73 (function (exports) { | 79 (function (exports) { |
| 74 var originalXMLHttpRequest = window.XMLHttpRequest; | 80 var originalXMLHttpRequest = window.XMLHttpRequest; |
| 75 | 81 |
| 76 // Mock XMLHttpRequest. It dispatches a 'load' event immediately with status | 82 // Mock XMLHttpRequest. It dispatches a 'load' event immediately with status |
| 77 // equals to 200 in function |send|. | 83 // equals to 200 in function |send|. |
| 78 function MockXMLHttpRequest() { | 84 function MockXMLHttpRequest() { |
| 79 } | 85 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 }; | 132 }; |
| 127 | 133 |
| 128 function uninstallMockXMLHttpRequest() { | 134 function uninstallMockXMLHttpRequest() { |
| 129 window['XMLHttpRequest'] = originalXMLHttpRequest; | 135 window['XMLHttpRequest'] = originalXMLHttpRequest; |
| 130 }; | 136 }; |
| 131 | 137 |
| 132 exports.installMockXMLHttpRequest = installMockXMLHttpRequest; | 138 exports.installMockXMLHttpRequest = installMockXMLHttpRequest; |
| 133 exports.uninstallMockXMLHttpRequest = uninstallMockXMLHttpRequest; | 139 exports.uninstallMockXMLHttpRequest = uninstallMockXMLHttpRequest; |
| 134 | 140 |
| 135 })(window); | 141 })(window); |
| OLD | NEW |