fix tests
This commit is contained in:
parent
1c2bc29424
commit
c5031db61c
3 changed files with 7 additions and 3 deletions
|
|
@ -116,6 +116,7 @@ function DefaultHandlers(mouseHandler) {
|
||||||
else if (!this.$clickSelection) {
|
else if (!this.$clickSelection) {
|
||||||
editor.selection.moveToPosition(pos);
|
editor.selection.moveToPosition(pos);
|
||||||
}
|
}
|
||||||
|
this.select();
|
||||||
}.bind(this), 0);
|
}.bind(this), 0);
|
||||||
if (editor.renderer.scroller.setCapture) {
|
if (editor.renderer.scroller.setCapture) {
|
||||||
editor.renderer.scroller.setCapture();
|
editor.renderer.scroller.setCapture();
|
||||||
|
|
|
||||||
|
|
@ -58,15 +58,17 @@ module.exports = {
|
||||||
next();
|
next();
|
||||||
},
|
},
|
||||||
|
|
||||||
"test: double tap. issue #956" : function() {
|
"test: double tap. issue #956" : function(done) {
|
||||||
// mouse up fired immediately after mouse down
|
// mouse up fired immediately after mouse down
|
||||||
var target = this.editor.renderer.getMouseEventTarget();
|
var target = this.editor.renderer.getMouseEventTarget();
|
||||||
target.dispatchEvent(MouseEvent("down", {x: 1, y: 1}));
|
target.dispatchEvent(MouseEvent("down", {x: 1, y: 1}));
|
||||||
target.dispatchEvent(MouseEvent("up", {x: 1, y: 1}));
|
target.dispatchEvent(MouseEvent("up", {x: 1, y: 1}));
|
||||||
target.dispatchEvent(MouseEvent("down", {x: 1, y: 1, detail: 2}));
|
target.dispatchEvent(MouseEvent("down", {x: 1, y: 1, detail: 2}));
|
||||||
target.dispatchEvent(MouseEvent("up", {x: 1, y: 1, detail: 2}));
|
target.dispatchEvent(MouseEvent("up", {x: 1, y: 1, detail: 2}));
|
||||||
|
setTimeout(function() {
|
||||||
assert.equal(this.editor.getSelectedText(), "Juhu");
|
assert.equal(this.editor.getSelectedText(), "Juhu");
|
||||||
|
done();
|
||||||
|
}.bind(this));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ var testNames = [
|
||||||
"ace/mode/folding/xml_test",
|
"ace/mode/folding/xml_test",
|
||||||
"ace/mode/folding/coffee_test",
|
"ace/mode/folding/coffee_test",
|
||||||
"ace/multi_select_test",
|
"ace/multi_select_test",
|
||||||
|
"ace/mouse/mouse_handler_test",
|
||||||
"ace/occur_test",
|
"ace/occur_test",
|
||||||
"ace/range_test",
|
"ace/range_test",
|
||||||
"ace/range_list_test",
|
"ace/range_list_test",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue