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

Unified Diff: test/subscriptionClasses.js

Issue 29354864: Issue 4223 - Migrate some more of adblockplustests (Closed)
Patch Set: Use sandboxed-module Created Sept. 29, 2016, 3:44 p.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/subscriptionClasses.js
diff --git a/test/subscriptionClasses.js b/test/subscriptionClasses.js
index 16e793350891ef91d28efff6cae5328111792ade..9bc15f0075acae4761914aa06e03a9362a04505c 100644
--- a/test/subscriptionClasses.js
+++ b/test/subscriptionClasses.js
@@ -17,17 +17,20 @@
"use strict";
+let {createSandbox} = require("common");
+let sandboxedRequire = createSandbox();
+
let {
Subscription, SpecialSubscription, DownloadableSubscription,
RegularSubscription, ExternalSubscription
-} = require("../lib/subscriptionClasses");
+} = sandboxedRequire("subscriptionClasses");
function compareSubscription(test, url, expected, postInit)
{
- expected.push("[Subscription]")
+ expected.push("[Subscription]");
let subscription = Subscription.fromURL(url);
if (postInit)
- postInit(subscription)
+ postInit(subscription);
let result = [];
subscription.serialize(result);
test.equal(result.sort().join("\n"), expected.sort().join("\n"), url);
@@ -74,7 +77,7 @@ exports.testSubscriptionsWithState = function(test)
subscription.expires = 20;
subscription.downloadStatus = "foo";
subscription.errors = 3;
- subscription.version = 24
+ subscription.version = 24;
subscription.requiredVersion = "0.6";
});
compareSubscription(test, "~wl~", ["url=~wl~", "disabled=true", "title=Test group"], function(subscription)
« test/elemHide.js ('K') | « test/stub-modules/io.js ('k') | test_wrapper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld