(str)
| 2594 | */ |
| 2595 | |
| 2596 | function testCoordsWrappedBidi(str) { |
| 2597 | testCM("coords_wrapped_bidi_" + str, function(cm) { |
| 2598 | cm.getScrollerElement().style.fontFamily = "monospace"; |
| 2599 | makeItWrapAfter(cm, Pos(0, 5)); |
| 2600 | |
| 2601 | // Make sure we are at the visual beginning of the first line |
| 2602 | var pos = Pos(0, 0), lastPos; |
| 2603 | cm.doc.setCursor(pos); |
| 2604 | do { |
| 2605 | lastPos = pos; |
| 2606 | cm.execCommand("goCharLeft"); |
| 2607 | pos = cm.doc.getCursor(); |
| 2608 | } while (pos != lastPos) |
| 2609 | |
| 2610 | var top = cm.charCoords(Pos(0, 0)).top, lastTop; |
| 2611 | for (var i = 1; i < str.length; ++i) { |
| 2612 | lastTop = top; |
| 2613 | top = cm.charCoords(Pos(0, i)).top; |
| 2614 | is(top >= lastTop); |
| 2615 | } |
| 2616 | }, {value: str, lineWrapping: true}) |
| 2617 | }; |
| 2618 | |
| 2619 | testCoordsWrappedBidi("Count ١ ٢ ٣ ٤"); |
| 2620 | /* |
no test coverage detected