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

Issue 29356024: Issue 4223 - Adapt filter storage read/write tests to work in adblockpluscore repository (Closed)

Created:
Oct. 5, 2016, 8:02 p.m. by Wladimir Palant
Modified:
Oct. 6, 2016, 8:09 a.m.
Reviewers:
kzar
Base URL:
https://hg.adblockplus.org/adblockpluscore
Visibility:
Public.

Description

Issue 4223 - Adapt filter storage read/write tests to work in adblockpluscore repository

Patch Set 1 #

Total comments: 14

Patch Set 2 : Addressed comments #

Patch Set 3 : Simplified loadFilters/saveFilters helpers a bit further #

Unified diffs Side-by-side diffs Delta from patch set Stats (+365 lines, -331 lines) Patch
M README.md View 1 1 chunk +4 lines, -7 lines 0 comments Download
M test/filterStorage_readwrite.js View 1 2 1 chunk +252 lines, -319 lines 0 comments Download
M test/stub-modules/io.js View 2 chunks +107 lines, -4 lines 0 comments Download
M test/stub-modules/utils.js View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 5
Wladimir Palant
Oct. 5, 2016, 8:02 p.m. (2016-10-05 20:02:37 UTC) #1
Wladimir Palant
https://codereview.adblockplus.org/29356024/diff/29356025/test/filterStorage_readwrite.js File test/filterStorage_readwrite.js (right): https://codereview.adblockplus.org/29356024/diff/29356025/test/filterStorage_readwrite.js#newcode149 test/filterStorage_readwrite.js:149: FilterStorage.addSubscription(subscription); This was calling our public API in the ...
Oct. 5, 2016, 8:10 p.m. (2016-10-05 20:10:23 UTC) #2
kzar
https://codereview.adblockplus.org/29356024/diff/29356025/README.md File README.md (right): https://codereview.adblockplus.org/29356024/diff/29356025/README.md#newcode16 README.md:16: in the `test` directory of the repository. Mind mentioning ...
Oct. 6, 2016, 5:13 a.m. (2016-10-06 05:13:38 UTC) #3
Wladimir Palant
https://codereview.adblockplus.org/29356024/diff/29356025/README.md File README.md (right): https://codereview.adblockplus.org/29356024/diff/29356025/README.md#newcode16 README.md:16: in the `test` directory of the repository. On 2016/10/06 ...
Oct. 6, 2016, 7:13 a.m. (2016-10-06 07:13:59 UTC) #4
kzar
Oct. 6, 2016, 8:06 a.m. (2016-10-06 08:06:47 UTC) #5
LGTM

https://codereview.adblockplus.org/29356024/diff/29356025/test/filterStorage_...
File test/filterStorage_readwrite.js (right):

https://codereview.adblockplus.org/29356024/diff/29356025/test/filterStorage_...
test/filterStorage_readwrite.js:50: let datapath = path.resolve(__dirname,
"data", "patterns.ini");
On 2016/10/06 07:13:59, Wladimir Palant wrote:
> On 2016/10/06 05:13:38, kzar wrote:
> > Did you forget to add the data/patterns.ini file?
> 
> No, I copied the files in a separate commit - what you have here is merely a
> diff from the original files. The patterns.ini we use for tests wasn't
modified.

Acknowledged.

https://codereview.adblockplus.org/29356024/diff/29356025/test/filterStorage_...
test/filterStorage_readwrite.js:203: test.equal(subscription.url, url,
"Subscription ID");
On 2016/10/06 07:13:59, Wladimir Palant wrote:
> On 2016/10/06 05:13:37, kzar wrote:
> > Won't `url` always be "~eh~" by the time the test is run?
> 
> Good question. I checked and this isn't the case - we actually run this test
> with all three variants for `url`. However, changing `let url` into `var url`
> will produce the behavior you expected.

Ah of course.

Powered by Google App Engine
This is Rietveld