fix tests

This commit is contained in:
nightwing 2012-04-24 22:30:12 +04:00
commit 43327bbbe4
2 changed files with 6 additions and 2 deletions

View file

@ -82,7 +82,7 @@ module.exports = {
editor.navigateTo(0, 0);
editor.gotoLine(101);
assert.position(editor.getCursorPosition(), 100, 0);
assert.equal(editor.getFirstVisibleRow(), 90);
assert.equal(editor.getFirstVisibleRow(), 89);
editor.navigateTo(100, 0);
editor.gotoLine(11);
@ -102,7 +102,7 @@ module.exports = {
editor.navigateTo(0, 0);
editor.gotoLine(191);
assert.position(editor.getCursorPosition(), 190, 0);
assert.equal(editor.getFirstVisibleRow(), 180);
assert.equal(editor.getFirstVisibleRow(), 179);
editor.navigateTo(0, 0);
editor.gotoLine(196);

View file

@ -107,6 +107,10 @@ MockRenderer.prototype.on = function() {
MockRenderer.prototype.updateCursor = function() {
};
MockRenderer.prototype.animateScrolling = function(scrollFunc, self) {
scrollFunc.call(self);
};
MockRenderer.prototype.scrollToX = function(scrollTop) {};
MockRenderer.prototype.scrollToY = function(scrollLeft) {};