LEFT | RIGHT |
| 1 "use strict"; |
| 2 |
1 { | 3 { |
2 let filterClasses = require("filterClasses"); | 4 const {Filter, ElemHideFilter} = require("filterClasses"); |
3 let Filter = filterClasses.Filter; | 5 const {escapeCSS, quoteCSS} = require("filterComposer"); |
4 let ElemHideFilter = filterClasses.ElemHideFilter; | |
5 | |
6 let filterComposer = require("filterComposer"); | |
7 let escapeCSS = filterComposer.escapeCSS; | |
8 let quoteCSS = filterComposer.quoteCSS; | |
9 | 6 |
10 module("CSS escaping"); | 7 module("CSS escaping"); |
11 | 8 |
12 test("CSS escaping", () => | 9 test("CSS escaping", () => |
13 { | 10 { |
14 function testSelector(opts) | 11 function testSelector(opts) |
15 { | 12 { |
16 let mustMatch = opts.mustMatch !== false; | 13 let mustMatch = opts.mustMatch !== false; |
17 let doc = document.implementation.createHTMLDocument(); | 14 let doc = document.implementation.createHTMLDocument(); |
18 | 15 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 testEscape("x" + chr); | 96 testEscape("x" + chr); |
100 | 97 |
101 // Leading dashes must be escaped, when followed by certain characters. | 98 // Leading dashes must be escaped, when followed by certain characters. |
102 testEscape("-" + chr); | 99 testEscape("-" + chr); |
103 } | 100 } |
104 | 101 |
105 // Test some non-ASCII characters. However, those shouldn't require escaping
. | 102 // Test some non-ASCII characters. However, those shouldn't require escaping
. |
106 testEscape("\uD83D\uDE3B\u2665\u00E4"); | 103 testEscape("\uD83D\uDE3B\u2665\u00E4"); |
107 }); | 104 }); |
108 } | 105 } |
LEFT | RIGHT |