Add fully qualified function calls, shuffle a couple tiny functions into svgutils.js, add an empty coords.js module for later

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2390 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Jeff Schiller
2013-02-14 15:19:46 +00:00
parent e150132453
commit a779a74aa9
7 changed files with 262 additions and 193 deletions

View File

@@ -16,6 +16,7 @@
<iframe src='units_test.html' width='100%' height='70' scrolling='no'></iframe>
<iframe src='path_test.html' width='100%' height='70' scrolling='no'></iframe>
<iframe src='sanitize_test.html' width='100%' height='70' scrolling='no'></iframe>
<iframe src='coords_test.html' width='100%' height='70' scrolling='no'></iframe>
</body>
<script>
window.setTimeout(function() {

38
test/coords_test.html Normal file
View File

@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' href='qunit/qunit.css' type='text/css'/>
<script type='text/javascript' src='../editor/jquery.js'></script>
<script type='text/javascript' src='../editor/browser.js'></script>
<script type='text/javascript' src='../editor/svgutils.js'></script>
<script type='text/javascript' src='../editor/sanitize.js'></script>
<script type='text/javascript' src='qunit/qunit.js'></script>
<script type='text/javascript'>
$(function() {
// log function
QUnit.log = function(result, message) {
if (window.console && window.console.log) {
window.console.log(result +' :: '+ message);
}
};
var svgns = 'http://www.w3.org/2000/svg';
var svg = document.createElementNS(svgns, 'svg');
// TODO: Since recalculateDimensions() and surrounding code is
// probably the largest, most complicated and strange piece of
// code in SVG-edit, we need to write a whole lot of unit tests
// for it here.
});
</script>
</head>
<body>
<h1 id='qunit-header'>Unit Tests for svgedit.coords</h1>
<h2 id='qunit-banner'></h2>
<h2 id='qunit-userAgent'></h2>
<ol id='qunit-tests'>
</ol>
<div id='anchor' style='visibility:hidden'>
</div>
</body>
</html>