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

Unified Diff: test/_common.js

Issue 29887560: Issue 6972 - Use Buffer.from in tests (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Sept. 21, 2018, 9:08 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/_common.js
===================================================================
--- a/test/_common.js
+++ b/test/_common.js
@@ -38,18 +38,18 @@
};
let XPCOMUtils = {
generateQI() {}
};
let FileUtils = {};
let resources = {Services, XPCOMUtils, FileUtils};
let globals = {
- atob: data => new Buffer(data, "base64").toString("binary"),
- btoa: data => new Buffer(data, "binary").toString("base64"),
+ atob: data => Buffer.from(data, "base64").toString("binary"),
+ btoa: data => Buffer.from(data, "binary").toString("base64"),
Ci: {
},
Cu: {
import(resource)
{
let match = /^resource:\/\/gre\/modules\/(.+)\.jsm$/.exec(resource);
let resourceName = match && match[1];
if (resourceName && resources.hasOwnProperty(resourceName))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld