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

Powered by Google App Engine
This is Rietveld