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

Unified Diff: qunit/tests/cssEscaping.js

Issue 29452181: Noissue - Merge current tip to Edge bookmark (Closed)
Patch Set: Created May 30, 2017, 3:49 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
===================================================================
--- 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