@@ -25,6 +25,7 @@ function byClassName(elt, cls) {
2525var ie_lt8 = / M S I E [ 1 - 7 ] \b / . test ( navigator . userAgent ) ;
2626var mac = / M a c / . test ( navigator . platform ) ;
2727var phantom = / P h a n t o m J S / . test ( navigator . userAgent ) ;
28+ var opera_lt10 = / O p e r a \/ [ 1 - 9 ] \. / . test ( navigator . userAgent ) ;
2829
2930test ( "core_fromTextArea" , function ( ) {
3031 var te = document . getElementById ( "code" ) ;
@@ -674,7 +675,7 @@ testCM("wrappingAndResizing", function(cm) {
674675 cm . setValue ( doc ) ;
675676 for ( var step = 10 , w = cm . charCoords ( { line : 0 , ch : 18 } , "div" ) . right ; ; w += step ) {
676677 cm . setSize ( w ) ;
677- if ( wrap . offsetHeight <= h0 * 1.5 ) {
678+ if ( wrap . offsetHeight <= h0 * ( opera_lt10 ? 1.2 : 1.5 ) ) {
678679 if ( step == 10 ) { w -= 10 ; step = 1 ; }
679680 else break ;
680681 }
@@ -715,7 +716,7 @@ testCM("measureEndOfLine", function(cm) {
715716 is ( endPos . left > w - 20 , "not at right" ) ;
716717 endPos = cm . charCoords ( { line : 0 , ch : 18 } ) ;
717718 eqPos ( cm . coordsChar ( { left : endPos . left , top : endPos . top + 5 } ) , { line : 0 , ch : 18 } ) ;
718- } , { mode : "text/html" , value : "<!-- foo barrr -->" , lineWrapping : true } , ie_lt8 ) ;
719+ } , { mode : "text/html" , value : "<!-- foo barrr -->" , lineWrapping : true } , ie_lt8 || opera_lt10 ) ;
719720
720721testCM ( "scrollVerticallyAndHorizontally" , function ( cm ) {
721722 cm . setSize ( 100 , 100 ) ;
@@ -740,7 +741,7 @@ testCM("moveVstuck", function(cm) {
740741 cm . setCursor ( { line : 0 , ch : val . length - 1 } ) ;
741742 cm . moveV ( - 1 , "line" ) ;
742743 eqPos ( cm . getCursor ( ) , { line : 0 , ch : 26 } ) ;
743- } , { lineWrapping : true } , ie_lt8 ) ;
744+ } , { lineWrapping : true } , ie_lt8 || opera_lt10 ) ;
744745
745746testCM ( "clickTab" , function ( cm ) {
746747 var p0 = cm . charCoords ( { line : 0 , ch : 0 } ) ;
0 commit comments