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

Unified Diff: test/subscriptionClasses.js

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Patch Set: Updated unit test framework to the current state of the repository Created Nov. 24, 2016, 3:40 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
« no previous file with comments | « test/stub-modules/info.js ('k') | test_runner.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/subscriptionClasses.js
===================================================================
--- a/test/subscriptionClasses.js
+++ b/test/subscriptionClasses.js
@@ -12,20 +12,35 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
"use strict";
-let {
- Subscription, SpecialSubscription, DownloadableSubscription,
- RegularSubscription, ExternalSubscription
-} = require("../lib/subscriptionClasses");
+let {createSandbox} = require("./_common");
+
+let Subscription = null;
+let SpecialSubscription = null;
+let DownloadableSubscription = null;
+let RegularSubscription = null;
+let ExternalSubscription = null;
+
+exports.setUp = function(callback)
+{
+ let sandboxedRequire = createSandbox();
+ (
+ {
+ Subscription, SpecialSubscription, DownloadableSubscription,
+ RegularSubscription, ExternalSubscription
+ } = sandboxedRequire("../lib/subscriptionClasses")
+ );
+ callback();
+};
function compareSubscription(test, url, expected, postInit)
{
expected.push("[Subscription]")
let subscription = Subscription.fromURL(url);
if (postInit)
postInit(subscription)
let result = [];
« no previous file with comments | « test/stub-modules/info.js ('k') | test_runner.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld