@@ -58,7 +58,7 @@ describe('ConnectedPositionStrategy', () => {
5858 overlayContainerElement . appendChild ( overlayElement ) ;
5959
6060 fakeElementRef = new FakeElementRef ( originElement ) ;
61- positionBuilder = new OverlayPositionBuilder ( viewportRuler ) ;
61+ positionBuilder = new OverlayPositionBuilder ( viewportRuler , document ) ;
6262 } ) ;
6363
6464 afterEach ( ( ) => {
@@ -177,7 +177,7 @@ describe('ConnectedPositionStrategy', () => {
177177 } ) ;
178178
179179 it ( 'should reposition the overlay if it would go off the bottom of the screen' , ( ) => {
180- positionBuilder = new OverlayPositionBuilder ( viewportRuler ) ;
180+ positionBuilder = new OverlayPositionBuilder ( viewportRuler , document ) ;
181181
182182 originElement . style . bottom = '25px' ;
183183 originElement . style . left = '200px' ;
@@ -200,7 +200,7 @@ describe('ConnectedPositionStrategy', () => {
200200 } ) ;
201201
202202 it ( 'should reposition the overlay if it would go off the right of the screen' , ( ) => {
203- positionBuilder = new OverlayPositionBuilder ( viewportRuler ) ;
203+ positionBuilder = new OverlayPositionBuilder ( viewportRuler , document ) ;
204204
205205 originElement . style . top = '200px' ;
206206 originElement . style . right = '25px' ;
@@ -224,7 +224,7 @@ describe('ConnectedPositionStrategy', () => {
224224 } ) ;
225225
226226 it ( 'should recalculate and set the last position with recalculateLastPosition()' , ( ) => {
227- positionBuilder = new OverlayPositionBuilder ( viewportRuler ) ;
227+ positionBuilder = new OverlayPositionBuilder ( viewportRuler , document ) ;
228228
229229 // Push the trigger down so the overlay doesn't have room to open on the bottom.
230230 originElement . style . bottom = '25px' ;
@@ -254,7 +254,7 @@ describe('ConnectedPositionStrategy', () => {
254254 } ) ;
255255
256256 it ( 'should default to the initial position, if no positions fit in the viewport' , ( ) => {
257- positionBuilder = new OverlayPositionBuilder ( viewportRuler ) ;
257+ positionBuilder = new OverlayPositionBuilder ( viewportRuler , document ) ;
258258
259259 // Make the origin element taller than the viewport.
260260 originElement . style . height = '1000px' ;
@@ -353,7 +353,7 @@ describe('ConnectedPositionStrategy', () => {
353353 } ) ;
354354
355355 it ( 'should emit onPositionChange event when position changes' , ( ) => {
356- positionBuilder = new OverlayPositionBuilder ( viewportRuler ) ;
356+ positionBuilder = new OverlayPositionBuilder ( viewportRuler , document ) ;
357357 originElement . style . top = '200px' ;
358358 originElement . style . right = '25px' ;
359359
@@ -390,7 +390,7 @@ describe('ConnectedPositionStrategy', () => {
390390 } ) ;
391391
392392 it ( 'should emit the onPositionChange event even if none of the positions fit' , ( ) => {
393- positionBuilder = new OverlayPositionBuilder ( viewportRuler ) ;
393+ positionBuilder = new OverlayPositionBuilder ( viewportRuler , document ) ;
394394 originElement . style . bottom = '25px' ;
395395 originElement . style . right = '25px' ;
396396
@@ -414,7 +414,7 @@ describe('ConnectedPositionStrategy', () => {
414414 } ) ;
415415
416416 it ( 'should pick the fallback position that shows the largest area of the element' , ( ) => {
417- positionBuilder = new OverlayPositionBuilder ( viewportRuler ) ;
417+ positionBuilder = new OverlayPositionBuilder ( viewportRuler , document ) ;
418418
419419 originElement . style . top = '200px' ;
420420 originElement . style . right = '25px' ;
@@ -561,7 +561,7 @@ describe('ConnectedPositionStrategy', () => {
561561 scrollable . appendChild ( originElement ) ;
562562
563563 // Create a strategy with knowledge of the scrollable container
564- let positionBuilder = new OverlayPositionBuilder ( viewportRuler ) ;
564+ let positionBuilder = new OverlayPositionBuilder ( viewportRuler , document ) ;
565565 let fakeElementRef = new FakeElementRef ( originElement ) ;
566566 strategy = positionBuilder . connectedTo (
567567 fakeElementRef ,
@@ -655,7 +655,7 @@ describe('ConnectedPositionStrategy', () => {
655655 overlayContainerElement . appendChild ( overlayElement ) ;
656656
657657 fakeElementRef = new FakeElementRef ( originElement ) ;
658- positionBuilder = new OverlayPositionBuilder ( viewportRuler ) ;
658+ positionBuilder = new OverlayPositionBuilder ( viewportRuler , document ) ;
659659 } ) ;
660660
661661 afterEach ( ( ) => {
0 commit comments