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

Unified Diff: test/stub-modules/utils.js

Issue 29355872: Issue 4223 - Adapt synchronizer tests to work in adblockpluscore repository (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Converted former loops into separate tests Created Oct. 5, 2016, 9:24 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
Index: test/stub-modules/utils.js
===================================================================
--- a/test/stub-modules/utils.js
+++ b/test/stub-modules/utils.js
@@ -1,1 +1,11 @@
-exports.Utils = {};
+let crypto = require("crypto");
+
+exports.Utils = {
+ generateChecksum: function(lines)
+ {
+ let buffer = new Buffer(lines.join("\n"), "utf-8");
+ let hash = crypto.createHash("md5");
+ hash.update(buffer);
+ return hash.digest("base64").replace(/=+$/, "");
+ }
+};
« no previous file with comments | « test/stub-modules/prefs.js ('k') | test/synchronizer.js » ('j') | test/synchronizer.js » ('J')

Powered by Google App Engine
This is Rietveld