Convert all tabs to spaces in tests for issue #37

This commit is contained in:
codedread
2018-05-17 21:12:27 -07:00
parent 81c11b2ce0
commit 8b7b2d89da
17 changed files with 3555 additions and 3555 deletions

View File

@@ -2,25 +2,25 @@
/* globals $, svgedit, equals */
/* eslint-disable no-var */
$(function () {
// log function
QUnit.log = function (details) {
if (window.console && window.console.log) {
window.console.log(details.result + ' :: ' + details.message);
}
};
// log function
QUnit.log = function (details) {
if (window.console && window.console.log) {
window.console.log(details.result + ' :: ' + details.message);
}
};
var svg = document.createElementNS(svgedit.NS.SVG, 'svg');
var svg = document.createElementNS(svgedit.NS.SVG, 'svg');
test('Test sanitizeSvg() strips ws from style attr', function () {
expect(2);
test('Test sanitizeSvg() strips ws from style attr', function () {
expect(2);
var rect = document.createElementNS(svgedit.NS.SVG, 'rect');
rect.setAttribute('style', 'stroke: blue ; stroke-width : 40;');
// sanitizeSvg() requires the node to have a parent and a document.
svg.appendChild(rect);
svgedit.sanitize.sanitizeSvg(rect);
var rect = document.createElementNS(svgedit.NS.SVG, 'rect');
rect.setAttribute('style', 'stroke: blue ; stroke-width : 40;');
// sanitizeSvg() requires the node to have a parent and a document.
svg.appendChild(rect);
svgedit.sanitize.sanitizeSvg(rect);
equals(rect.getAttribute('stroke'), 'blue');
equals(rect.getAttribute('stroke-width'), '40');
});
equals(rect.getAttribute('stroke'), 'blue');
equals(rect.getAttribute('stroke-width'), '40');
});
});