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

Side by Side Diff: qunit/tests/filterValidation.js

Issue 29492577: Noissue - Fix indentation errors for ESLint 4 (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created July 19, 2017, 1:25 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« options.js ('K') | « options.js ('k') | qunit/tests/url.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 "use strict"; 1 "use strict";
2 2
3 (function() 3 (function()
4 { 4 {
5 const {parseFilter, parseFilters} = require("filterValidation"); 5 const {parseFilter, parseFilters} = require("filterValidation");
6 const {BlockingFilter, 6 const {BlockingFilter, ElemHideFilter, CommentFilter} =
7 ElemHideFilter, 7 require("filterClasses");
8 CommentFilter} = require("filterClasses");
9 8
10 module("Filter validation"); 9 module("Filter validation");
11 10
12 test("Detecting invalid filters", () => 11 test("Detecting invalid filters", () =>
13 { 12 {
14 equal(parseFilter("||example.com^$unknown").error.type, "invalid-filter", 13 equal(parseFilter("||example.com^$unknown").error.type, "invalid-filter",
15 "unknown option"); 14 "unknown option");
16 equal(parseFilter("[foobar]").error.type, "unexpected-filter-list-header", 15 equal(parseFilter("[foobar]").error.type, "unexpected-filter-list-header",
17 "filter list header"); 16 "filter list header");
18 equal(parseFilter("##[foo").error.type, "invalid-css-selector", 17 equal(parseFilter("##[foo").error.type, "invalid-css-selector",
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 ok(result.filters[0] instanceof BlockingFilter, "1st filter is blocking"); 64 ok(result.filters[0] instanceof BlockingFilter, "1st filter is blocking");
66 equal(result.filters[0].text, "||example.com^", "1st filter text matches"); 65 equal(result.filters[0].text, "||example.com^", "1st filter text matches");
67 66
68 ok(result.filters[1] instanceof ElemHideFilter, "2nd filter is elemhide"); 67 ok(result.filters[1] instanceof ElemHideFilter, "2nd filter is elemhide");
69 equal(result.filters[1].text, "###foobar", "2nd filter text matches"); 68 equal(result.filters[1].text, "###foobar", "2nd filter text matches");
70 69
71 ok(result.filters[2] instanceof CommentFilter, "3rd filter is comment"); 70 ok(result.filters[2] instanceof CommentFilter, "3rd filter is comment");
72 equal(result.filters[2].text, "! foo bar", "3rd filter text matches"); 71 equal(result.filters[2].text, "! foo bar", "3rd filter text matches");
73 }); 72 });
74 }()); 73 }());
OLDNEW
« options.js ('K') | « options.js ('k') | qunit/tests/url.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld