Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: test/_common.js

Issue 29760704: Issue 6592 - Implement $rewrite filter option (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Use typeof to check for undefined Created May 16, 2018, 6:32 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/.eslintrc.json ('k') | test/filterClasses.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13 matching lines...) Expand all
24 const Cr = exports.Cr = { 24 const Cr = exports.Cr = {
25 NS_OK: 0, 25 NS_OK: 0,
26 NS_BINDING_ABORTED: 0x804B0002, 26 NS_BINDING_ABORTED: 0x804B0002,
27 NS_ERROR_FAILURE: 0x80004005 27 NS_ERROR_FAILURE: 0x80004005
28 }; 28 };
29 29
30 const MILLIS_IN_SECOND = exports.MILLIS_IN_SECOND = 1000; 30 const MILLIS_IN_SECOND = exports.MILLIS_IN_SECOND = 1000;
31 const MILLIS_IN_MINUTE = exports.MILLIS_IN_MINUTE = 60 * MILLIS_IN_SECOND; 31 const MILLIS_IN_MINUTE = exports.MILLIS_IN_MINUTE = 60 * MILLIS_IN_SECOND;
32 const MILLIS_IN_HOUR = exports.MILLIS_IN_HOUR = 60 * MILLIS_IN_MINUTE; 32 const MILLIS_IN_HOUR = exports.MILLIS_IN_HOUR = 60 * MILLIS_IN_MINUTE;
33 33
34 function URL(urlString) 34 // URL is global in Node 10. In Node 7+ it must be imported.
35 if (typeof global.URL == "undefined")
35 { 36 {
36 return require("url").parse(urlString); 37 global.URL = require("url").URL;
37 } 38 }
38 39
39 let Services = { 40 let Services = {
40 obs: { 41 obs: {
41 addObserver() {} 42 addObserver() {}
42 } 43 }
43 }; 44 };
44 let XPCOMUtils = { 45 let XPCOMUtils = {
45 generateQI() {} 46 generateQI() {}
46 }; 47 };
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 410 }
410 }) 411 })
411 }; 412 };
412 }; 413 };
413 414
414 exports.unexpectedError = function(error) 415 exports.unexpectedError = function(error)
415 { 416 {
416 console.error(error); 417 console.error(error);
417 this.ok(false, "Unexpected error: " + error); 418 this.ok(false, "Unexpected error: " + error);
418 }; 419 };
OLDNEW
« no previous file with comments | « test/.eslintrc.json ('k') | test/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld