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

Unified Diff: qunit/tests/cssEscaping.js

Issue 29374674: Issue 4864 - Start using ESLint for adblockpluschrome (Closed)
Patch Set: Rebased Created March 17, 2017, 12:41 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 | « qunit/common.js ('k') | qunit/tests/filterValidation.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: qunit/tests/cssEscaping.js
diff --git a/qunit/tests/cssEscaping.js b/qunit/tests/cssEscaping.js
index 1ba05486dca37b0f970f9522b44b01d19317935e..8b43c9ce0ce2fce91e1c7d595b761f36fe794acb 100644
--- a/qunit/tests/cssEscaping.js
+++ b/qunit/tests/cssEscaping.js
@@ -1,5 +1,6 @@
"use strict";
+(function()
{
const {Filter, ElemHideFilter} = require("filterClasses");
const {escapeCSS, quoteCSS} = require("filterComposer");
@@ -43,16 +44,11 @@
let filter = Filter.fromText("##" + opts.selector);
if (!(filter instanceof ElemHideFilter))
- {
ok(false, opts.selector + " (not allowed in elemhide filters)");
- }
+ else if (mustMatch)
+ equal(foundElement, element, opts.selector);
else
- {
- if (mustMatch)
- equal(foundElement, element, opts.selector);
- else
- ok(true, opts.selector);
- }
+ ok(true, opts.selector);
}
function testEscape(s)
@@ -99,7 +95,8 @@
testEscape("-" + chr);
}
- // Test some non-ASCII characters. However, those shouldn't require escaping.
+ // Test some non-ASCII characters. However, those shouldn't
+ // require escaping.
testEscape("\uD83D\uDE3B\u2665\u00E4");
});
-}
+}());
« no previous file with comments | « qunit/common.js ('k') | qunit/tests/filterValidation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld