MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / testMovedownFixed

Function testMovedownFixed

lib/web/CodeMirror/test/scroll_test.js:35–45  ·  view source on GitHub ↗
(cm, hScroll)

Source from the content-addressed store, hash-verified

33 }
34
35 function testMovedownFixed(cm, hScroll) {
36 cm.setSize("100px", "100px");
37 if (hScroll) cm.setValue(new Array(100).join("x"));
38 var bottom = displayBottom(cm, hScroll);
39 for (var i = 0; i < 30; i++) {
40 cm.replaceSelection("x\n");
41 var cursorBottom = cm.cursorCoords(null, "window").bottom;
42 is(cursorBottom <= bottom);
43 }
44 is(cursorBottom >= bottom - 5);
45 }
46
47 testCM("movedown_fixed", function(cm) {testMovedownFixed(cm, false);});
48 testCM("movedown_hscroll_fixed", function(cm) {testMovedownFixed(cm, true);});

Callers 1

scroll_test.jsFile · 0.85

Calls 3

displayBottomFunction · 0.85
isFunction · 0.70
setValueMethod · 0.45

Tested by

no test coverage detected