Move Selector and SelectorManager into select.js. Start of unit test file for select.js.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1873 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -18,6 +18,6 @@ window.setTimeout(function() {
|
||||
var f = iframes[i];
|
||||
f.style.height = (f.contentDocument.body.scrollHeight + 20) + 'px';
|
||||
}
|
||||
}, 1000);
|
||||
}, 1200);
|
||||
</script>
|
||||
</html>
|
||||
@@ -7,6 +7,7 @@
|
||||
<script type='text/javascript' src='qunit/qunit.js'></script>
|
||||
<script type='text/javascript'>
|
||||
$(function() {
|
||||
// TODO(codedread): Write tests for handling history events.
|
||||
|
||||
// Mocked out methods.
|
||||
svgedit.transformlist = {};
|
||||
@@ -547,6 +548,8 @@
|
||||
batch.unapply();
|
||||
equals(concatResult, 'cba');
|
||||
|
||||
MockCommand.prototype.unapply = function() {};
|
||||
|
||||
tearDown();
|
||||
});
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel='stylesheet' href='qunit/qunit.css' type='text/css'/>
|
||||
<html>
|
||||
<head>
|
||||
<link rel='stylesheet' href='qunit/qunit.css' type='text/css'/>
|
||||
<script src='../editor/jquery.js'></script>
|
||||
<script type='text/javascript' src='../editor/math.js'></script>
|
||||
<script type='text/javascript' src='qunit/qunit.js'></script>
|
||||
<script type='text/javascript' src='qunit/qunit.js'></script>
|
||||
<script type='text/javascript'>
|
||||
$(function() {
|
||||
// log function
|
||||
|
||||
44
test/select_test.html
Normal file
44
test/select_test.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel='stylesheet' href='qunit/qunit.css' type='text/css'/>
|
||||
<script src='../editor/jquery.js'></script>
|
||||
<script type='text/javascript' src='../editor/select.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);
|
||||
}
|
||||
};
|
||||
|
||||
module('svgedit.select');
|
||||
|
||||
test('Test svgedit.select package', function() {
|
||||
expect(10);
|
||||
|
||||
ok(svgedit.select);
|
||||
ok(svgedit.select.Selector);
|
||||
ok(svgedit.select.SelectorManager);
|
||||
ok(svgedit.select.init);
|
||||
ok(svgedit.select.getSelectorManager);
|
||||
equals(typeof svgedit.select, typeof {});
|
||||
equals(typeof svgedit.select.Selector, typeof function(){});
|
||||
equals(typeof svgedit.select.SelectorManager, typeof function(){});
|
||||
equals(typeof svgedit.select.init, typeof function(){});
|
||||
equals(typeof svgedit.select.getSelectorManager, typeof function(){});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id='qunit-header'>Unit Tests for select.js</h1>
|
||||
<h2 id='qunit-banner'></h2>
|
||||
<h2 id='qunit-userAgent'></h2>
|
||||
<ol id='qunit-tests'>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
||||
@@ -12,6 +12,7 @@
|
||||
<script type="text/javascript" src="../editor/svgutils.js"></script>
|
||||
<script type="text/javascript" src="../editor/sanitize.js"></script>
|
||||
<script type="text/javascript" src="../editor/history.js"></script>
|
||||
<script type="text/javascript" src="../editor/select.js"></script>
|
||||
<script type="text/javascript" src="../editor/svgcanvas.js"></script>
|
||||
<script type="text/javascript" src="qunit/qunit.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
Reference in New Issue
Block a user