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

Function testMovedownResize

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

Source from the content-addressed store, hash-verified

48 testCM("movedown_hscroll_fixed", function(cm) {testMovedownFixed(cm, true);});
49
50 function testMovedownResize(cm, hScroll) {
51 cm.getWrapperElement().style.height = "auto";
52 if (hScroll) cm.setValue(new Array(100).join("x"));
53 cm.refresh();
54 for (var i = 0; i < 30; i++) {
55 cm.replaceSelection("x\n");
56 var bottom = displayBottom(cm, hScroll);
57 var cursorBottom = cm.cursorCoords(null, "window").bottom;
58 is(cursorBottom <= bottom);
59 is(cursorBottom >= bottom - 5);
60 }
61 }
62
63 testCM("movedown_resize", function(cm) {testMovedownResize(cm, false);});
64 testCM("movedown_hscroll_resize", function(cm) {testMovedownResize(cm, true);});

Callers 1

scroll_test.jsFile · 0.85

Calls 4

displayBottomFunction · 0.85
refreshMethod · 0.80
isFunction · 0.70
setValueMethod · 0.45

Tested by

no test coverage detected