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

Delta Between Two Patch Sets: qunit/tests/subscriptionInit.js

Issue 29805597: Issue 6699 - Support the "circumvention" filter list as default subscription (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Left Patch Set: More review fixes. Created June 14, 2018, 7:59 p.m.
Right Patch Set: Use "==" instead of "in" Created June 19, 2018, 12:40 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « qunit/subscriptions.xml ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 27 matching lines...) Expand all
38 .then(text => 38 .then(text =>
39 { 39 {
40 let doc = new DOMParser().parseFromString(text, "application/xml"); 40 let doc = new DOMParser().parseFromString(text, "application/xml");
41 let nodes = doc.getElementsByTagName("subscription"); 41 let nodes = doc.getElementsByTagName("subscription");
42 42
43 let subs = chooseFilterSubscriptions(nodes); 43 let subs = chooseFilterSubscriptions(nodes);
44 assert.ok(subs); 44 assert.ok(subs);
45 assert.ok(subs.circumvention); 45 assert.ok(subs.circumvention);
46 assert.ok(subs.ads); 46 assert.ok(subs.ads);
47 47
48 assert.equal(subs.circumvention.getAttribute("prefixes"), "de,en,en-US") ; 48 assert.equal(subs.circumvention.getAttribute("prefixes"),
49 "de,en,en-US");
49 assert.equal(subs.circumvention.getAttribute("type"), "circumvention"); 50 assert.equal(subs.circumvention.getAttribute("type"), "circumvention");
50 assert.equal(subs.ads.getAttribute("prefixes"), "en"); 51 assert.equal(subs.ads.getAttribute("prefixes"), "en");
51 assert.equal(subs.ads.getAttribute("type"), "ads"); 52 assert.equal(subs.ads.getAttribute("type"), "ads");
52 53
53 done(); 54 done();
54 }) 55 })
55 .catch(() => 56 .catch(() =>
56 { 57 {
57 assert.ok(false); 58 assert.ok(false);
58 59
59 done(); 60 done();
60 }); 61 });
61 }); 62 });
62 } 63 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld