Correct mime type on svgutils_test.html. Add test for svgedit.utilities.bboxToObj()
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1859 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -16,6 +16,9 @@
|
||||
}
|
||||
};
|
||||
|
||||
var svgns = 'http://www.w3.org/2000/svg';
|
||||
var svg = document.createElementNS(svgns, 'svg');
|
||||
|
||||
module('svgedit.utilities Module');
|
||||
|
||||
test('Test svgedit.utilities package', function() {
|
||||
@@ -70,6 +73,24 @@
|
||||
equals(decode64('YH4hQCMkJV4mKigpLV89K1t7XX1cfDs6JyIsPC4+Lz8='), '`~!@#$%^&*()-_=+[{]}\\|;:\'",<.>/?');
|
||||
});
|
||||
|
||||
test('Test svgedit.utilities.bboxToObj() function', function() {
|
||||
expect(5);
|
||||
var bboxToObj = svgedit.utilities.bboxToObj;
|
||||
|
||||
var rect = svg.createSVGRect();
|
||||
rect.x = 1;
|
||||
rect.y = 2;
|
||||
rect.width = 3;
|
||||
rect.height = 4;
|
||||
|
||||
var obj = bboxToObj(rect);
|
||||
equals(typeof obj, typeof {});
|
||||
equals(obj.x, 1);
|
||||
equals(obj.y, 2);
|
||||
equals(obj.width, 3);
|
||||
equals(obj.height, 4);
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user