diff --git a/test/svgutils_test.html b/test/svgutils_test.html
index 6b2a41e4..290fce1a 100644
--- a/test/svgutils_test.html
+++ b/test/svgutils_test.html
@@ -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);
+ });
+
});
diff --git a/test/test1.html b/test/test1.html
index c488d647..96a727aa 100644
--- a/test/test1.html
+++ b/test/test1.html
@@ -241,15 +241,6 @@
equal(math.namespaceURI, "http://www.w3.org/1998/Math/MathML", "Preserved MathML namespace");
});
- test("Test escaping XML entities", function() {
- expect(3);
-
- equal(svgCanvas.Utils.toXml("<"), "<", "Escaped < properly");
- equal(svgCanvas.Utils.toXml(">"), ">", "Escaped > properly");
- equal(svgCanvas.Utils.toXml("&"), "&", "Escaped & properly");
- // TODO: what about " and ' ?
- });
-
test("Test importing SVG into existing drawing", function() {
expect(3);