@@ -393,6 +393,14 @@ async function verify() {
393393 } ) ;
394394 const surface = editor . getDomNode ( ) ! ;
395395 const backgroundColor = ( ) => getComputedStyle ( surface ) . backgroundColor . replace ( / / g, "" ) ;
396+ const overviewRulerBackground = ( ) => getComputedStyle ( surface )
397+ . getPropertyValue ( "--vscode-editorOverviewRuler-background" ) . trim ( ) . replace ( / / g, "" ) ;
398+ const overviewRulerPixel = ( ) => {
399+ editor . render ( ) ;
400+ const canvas = surface . querySelector < HTMLCanvasElement > ( ".decorationsOverviewRuler" ) ! ;
401+ assert ( canvas . width > 0 && canvas . height > 0 , "overview ruler has no render surface" ) ;
402+ return [ ...canvas . getContext ( "2d" ) ! . getImageData ( Math . floor ( canvas . width / 2 ) , Math . floor ( canvas . height / 2 ) , 1 , 1 ) . data ] ;
403+ } ;
396404 try {
397405 window . lithe . configure ( {
398406 fontFamily : "monospace" , fontSize : 13 , wrap : false , minimap : true ,
@@ -403,6 +411,9 @@ async function verify() {
403411 const solid = backgroundColor ( ) ;
404412 assert ( [ "rgb(242,243,244)" , "rgba(242,243,244,1)" ] . includes ( solid ) ,
405413 `host light theme did not replace Monaco's initial dark surface: ${ solid } ` ) ;
414+ assert ( overviewRulerBackground ( ) === "#f2f3f4" ,
415+ `opaque overview ruler background did not match the editor surface: ${ overviewRulerBackground ( ) } ` ) ;
416+ assert ( overviewRulerPixel ( ) . join ( ) === "242,243,244,255" , "solid overview ruler rendered with a different background" ) ;
406417 window . lithe . configure ( {
407418 fontFamily : "monospace" , fontSize : 13 , wrap : false , minimap : true ,
408419 theme : { id : "probe-light-wallpaper" , dark : false , colors : {
@@ -412,6 +423,9 @@ async function verify() {
412423 const transparent = backgroundColor ( ) ;
413424 assert ( transparent === "rgba(0,0,0,0)" ,
414425 `transparent Monaco surface still covered the native wallpaper: ${ transparent } ` ) ;
426+ assert ( overviewRulerBackground ( ) === "rgba(0,0,0,0)" ,
427+ `overview ruler still covered the native wallpaper: ${ overviewRulerBackground ( ) } ` ) ;
428+ assert ( overviewRulerPixel ( ) . join ( ) === "0,0,0,0" , "transparent overview ruler rendered an opaque strip" ) ;
415429 } finally {
416430 window . lithe . configure ( { dark : false , fontFamily : "monospace" , fontSize : 13 , wrap : false , minimap : true } ) ;
417431 await window . lithe . retain ( [ ] ) ;
0 commit comments