| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 addObserver() {} | 36 addObserver() {} |
| 37 } | 37 } |
| 38 }; | 38 }; |
| 39 let XPCOMUtils = { | 39 let XPCOMUtils = { |
| 40 generateQI() {} | 40 generateQI() {} |
| 41 }; | 41 }; |
| 42 let FileUtils = {}; | 42 let FileUtils = {}; |
| 43 let resources = {Services, XPCOMUtils, FileUtils}; | 43 let resources = {Services, XPCOMUtils, FileUtils}; |
| 44 | 44 |
| 45 let globals = { | 45 let globals = { |
| 46 atob: data => new Buffer(data, "base64").toString("binary"), | 46 atob: data => Buffer.from(data, "base64").toString("binary"), |
| 47 btoa: data => new Buffer(data, "binary").toString("base64"), | 47 btoa: data => Buffer.from(data, "binary").toString("base64"), |
| 48 Ci: { | 48 Ci: { |
| 49 }, | 49 }, |
| 50 Cu: { | 50 Cu: { |
| 51 import(resource) | 51 import(resource) |
| 52 { | 52 { |
| 53 let match = /^resource:\/\/gre\/modules\/(.+)\.jsm$/.exec(resource); | 53 let match = /^resource:\/\/gre\/modules\/(.+)\.jsm$/.exec(resource); |
| 54 let resourceName = match && match[1]; | 54 let resourceName = match && match[1]; |
| 55 if (resourceName && resources.hasOwnProperty(resourceName)) | 55 if (resourceName && resources.hasOwnProperty(resourceName)) |
| 56 return {[resourceName]: resources[resourceName]}; | 56 return {[resourceName]: resources[resourceName]}; |
| 57 | 57 |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 } | 405 } |
| 406 }) | 406 }) |
| 407 }; | 407 }; |
| 408 }; | 408 }; |
| 409 | 409 |
| 410 exports.unexpectedError = function(error) | 410 exports.unexpectedError = function(error) |
| 411 { | 411 { |
| 412 console.error(error); | 412 console.error(error); |
| 413 this.ok(false, "Unexpected error: " + error); | 413 this.ok(false, "Unexpected error: " + error); |
| 414 }; | 414 }; |
| OLD | NEW |