@@ -232,7 +232,7 @@ describe('MinimapElement', () => {
232232 } )
233233 runs ( ( ) => {
234234 nextAnimationFrame ( )
235- expect ( minimapElement . DOMStylesReader . retrieveStyleFromDom ( [ '.editor' ] , 'color' ) , minimapElement . getTextEditorElement ( ) ) . toEqual ( `rgb(0, ${ 0x6d } , ${ 0x6d } )` )
235+ expect ( minimapElement . DOMStylesReader . retrieveStyleFromDom ( [ '.editor' ] , 'color' ) , minimapElement . minimap . getTextEditorElement ( ) ) . toEqual ( `rgb(0, ${ 0x6d } , ${ 0x6d } )` )
236236 } )
237237 } )
238238 } )
@@ -260,7 +260,7 @@ describe('MinimapElement', () => {
260260 } )
261261 runs ( ( ) => {
262262 nextAnimationFrame ( )
263- expect ( minimapElement . DOMStylesReader . retrieveStyleFromDom ( [ '.editor' ] , 'color' ) , minimapElement . getTextEditorElement ( ) ) . toEqual ( `rgba(0, ${ 0x6d } , ${ 0x6d } , 0)` )
263+ expect ( minimapElement . DOMStylesReader . retrieveStyleFromDom ( [ '.editor' ] , 'color' ) , minimapElement . minimap . getTextEditorElement ( ) ) . toEqual ( `rgba(0, ${ 0x6d } , ${ 0x6d } , 0)` )
264264 } )
265265 } )
266266 } )
@@ -329,10 +329,10 @@ describe('MinimapElement', () => {
329329 atom . config . set ( 'minimap.plugins.fooDecorationsZIndex' , 1 )
330330
331331 const calls = [ ]
332- spyOn ( minimapElement , 'drawLineDecoration' ) . andCallFake ( ( d ) => {
332+ spyOn ( minimapElement . CanvasDrawer , 'drawLineDecoration' ) . andCallFake ( ( d ) => {
333333 calls . push ( d . getProperties ( ) . plugin )
334334 } )
335- spyOn ( minimapElement , 'drawHighlightDecoration' ) . andCallFake ( ( d ) => {
335+ spyOn ( minimapElement . CanvasDrawer , 'drawHighlightDecoration' ) . andCallFake ( ( d ) => {
336336 calls . push ( d . getProperties ( ) . plugin )
337337 } )
338338
@@ -369,7 +369,7 @@ describe('MinimapElement', () => {
369369 } )
370370
371371 it ( 'renders the visible line decorations' , ( ) => {
372- spyOn ( minimapElement , 'drawLineDecoration' ) . andCallThrough ( )
372+ spyOn ( minimapElement . CanvasDrawer , 'drawLineDecoration' ) . andCallThrough ( )
373373
374374 minimap . decorateMarker ( editor . markBufferRange ( [ [ 1 , 0 ] , [ 1 , 10 ] ] ) , { type : 'line' , color : '#0000FF' } )
375375 minimap . decorateMarker ( editor . markBufferRange ( [ [ 10 , 0 ] , [ 10 , 10 ] ] ) , { type : 'line' , color : '#0000FF' } )
@@ -383,8 +383,8 @@ describe('MinimapElement', () => {
383383 runs ( ( ) => {
384384 nextAnimationFrame ( )
385385
386- expect ( minimapElement . drawLineDecoration ) . toHaveBeenCalled ( )
387- expect ( minimapElement . drawLineDecoration . calls . length ) . toEqual ( 2 )
386+ expect ( minimapElement . CanvasDrawer . drawLineDecoration ) . toHaveBeenCalled ( )
387+ expect ( minimapElement . CanvasDrawer . drawLineDecoration . calls . length ) . toEqual ( 2 )
388388 } )
389389 } )
390390
@@ -409,7 +409,7 @@ describe('MinimapElement', () => {
409409 } )
410410
411411 it ( 'renders the visible highlight decorations' , ( ) => {
412- spyOn ( minimapElement , 'drawHighlightDecoration' ) . andCallThrough ( )
412+ spyOn ( minimapElement . CanvasDrawer , 'drawHighlightDecoration' ) . andCallThrough ( )
413413
414414 minimap . decorateMarker ( editor . markBufferRange ( [ [ 1 , 0 ] , [ 1 , 4 ] ] ) , { type : 'highlight-under' , color : '#0000FF' } )
415415 minimap . decorateMarker ( editor . markBufferRange ( [ [ 2 , 20 ] , [ 2 , 30 ] ] ) , { type : 'highlight-over' , color : '#0000FF' } )
@@ -429,7 +429,7 @@ describe('MinimapElement', () => {
429429 } )
430430
431431 it ( 'renders the visible outline decorations' , ( ) => {
432- spyOn ( minimapElement , 'drawHighlightOutlineDecoration' ) . andCallThrough ( )
432+ spyOn ( minimapElement . CanvasDrawer , 'drawHighlightOutlineDecoration' ) . andCallThrough ( )
433433
434434 minimap . decorateMarker ( editor . markBufferRange ( [ [ 1 , 4 ] , [ 3 , 6 ] ] ) , { type : 'highlight-outline' , color : '#0000ff' } )
435435 minimap . decorateMarker ( editor . markBufferRange ( [ [ 6 , 0 ] , [ 6 , 7 ] ] ) , { type : 'highlight-outline' , color : '#0000ff' } )
@@ -443,13 +443,13 @@ describe('MinimapElement', () => {
443443 runs ( ( ) => {
444444 nextAnimationFrame ( )
445445
446- expect ( minimapElement . drawHighlightOutlineDecoration ) . toHaveBeenCalled ( )
447- expect ( minimapElement . drawHighlightOutlineDecoration . calls . length ) . toEqual ( 4 )
446+ expect ( minimapElement . CanvasDrawer . drawHighlightOutlineDecoration ) . toHaveBeenCalled ( )
447+ expect ( minimapElement . CanvasDrawer . drawHighlightOutlineDecoration . calls . length ) . toEqual ( 4 )
448448 } )
449449 } )
450450
451451 it ( 'renders the visible custom foreground decorations' , ( ) => {
452- spyOn ( minimapElement , 'drawCustomDecoration' ) . andCallThrough ( )
452+ spyOn ( minimapElement . CanvasDrawer , 'drawCustomDecoration' ) . andCallThrough ( )
453453
454454 const renderRoutine = jasmine . createSpy ( 'renderRoutine' )
455455
@@ -470,16 +470,16 @@ describe('MinimapElement', () => {
470470 runs ( ( ) => {
471471 nextAnimationFrame ( )
472472
473- expect ( minimapElement . drawCustomDecoration ) . toHaveBeenCalled ( )
474- expect ( minimapElement . drawCustomDecoration . calls . length ) . toEqual ( 4 )
473+ expect ( minimapElement . CanvasDrawer . drawCustomDecoration ) . toHaveBeenCalled ( )
474+ expect ( minimapElement . CanvasDrawer . drawCustomDecoration . calls . length ) . toEqual ( 4 )
475475
476476 expect ( renderRoutine ) . toHaveBeenCalled ( )
477477 expect ( renderRoutine . calls . length ) . toEqual ( 4 )
478478 } )
479479 } )
480480
481481 it ( 'renders the visible custom background decorations' , ( ) => {
482- spyOn ( minimapElement , 'drawCustomDecoration' ) . andCallThrough ( )
482+ spyOn ( minimapElement . CanvasDrawer , 'drawCustomDecoration' ) . andCallThrough ( )
483483
484484 const renderRoutine = jasmine . createSpy ( 'renderRoutine' )
485485
@@ -500,8 +500,8 @@ describe('MinimapElement', () => {
500500 runs ( ( ) => {
501501 nextAnimationFrame ( )
502502
503- expect ( minimapElement . drawCustomDecoration ) . toHaveBeenCalled ( )
504- expect ( minimapElement . drawCustomDecoration . calls . length ) . toEqual ( 4 )
503+ expect ( minimapElement . CanvasDrawer . drawCustomDecoration ) . toHaveBeenCalled ( )
504+ expect ( minimapElement . CanvasDrawer . drawCustomDecoration . calls . length ) . toEqual ( 4 )
505505
506506 expect ( renderRoutine ) . toHaveBeenCalled ( )
507507 expect ( renderRoutine . calls . length ) . toEqual ( 4 )
@@ -561,7 +561,7 @@ describe('MinimapElement', () => {
561561 runs ( ( ) => {
562562 nextAnimationFrame ( )
563563
564- spyOn ( minimapElement , 'drawLines' ) . andCallThrough ( )
564+ spyOn ( minimapElement . CanvasDrawer , 'drawLines' ) . andCallThrough ( )
565565 editor . insertText ( 'foo' )
566566 } )
567567 } )
@@ -573,9 +573,9 @@ describe('MinimapElement', () => {
573573 runs ( ( ) => {
574574 nextAnimationFrame ( )
575575
576- expect ( minimapElement . drawLines ) . toHaveBeenCalled ( )
576+ expect ( minimapElement . CanvasDrawer . drawLines ) . toHaveBeenCalled ( )
577577
578- const [ firstLine , lastLine ] = minimapElement . drawLines . argsForCall [ 0 ]
578+ const [ firstLine , lastLine ] = minimapElement . CanvasDrawer . drawLines . argsForCall [ 0 ]
579579
580580 // These tests are very flaky, depending on Atom's version the
581581 // measured values can changed so we have
0 commit comments