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

Delta Between Two Patch Sets: qunit/tests/cssEscaping.js

Issue 29371763: Issue 4795 - Use modern JavaScript syntax (Closed)
Left Patch Set: Created Jan. 13, 2017, 12:11 p.m.
Right Patch Set: Addressed some more feedback Created Jan. 18, 2017, 11:44 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « qunit/common.js ('k') | qunit/tests/filterValidation.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld