File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
test/source/feathers/tests Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -310,6 +310,32 @@ package feathers.tests
310310 }, 25 );
311311 }
312312
313+ [Test ]
314+ public function testNewMaskXPositionOnHorizontalScroll ():void
315+ {
316+ this . _scroller . width = BACKGROUND_WIDTH ;
317+ this . _scroller . height = BACKGROUND_HEIGHT ;
318+ this . _viewPort . width = LARGE_VIEW_PORT_WIDTH ;
319+ this . _scroller . validate ();
320+ this . _scroller . horizontalScrollPosition = this . _scroller . maxHorizontalScrollPosition / 2 ;
321+ this . _scroller . validate ();
322+ Assert. assertStrictlyEquals("The mask x position of the scroller's view port was not calculated correctly with horizontalScrollPosition > 0." ,
323+ this . _scroller . maxHorizontalScrollPosition / 2 , this . _viewPort . mask . x );
324+ }
325+
326+ [Test ]
327+ public function testNewMaskYPositionOnVerticalScroll ():void
328+ {
329+ this . _scroller . width = BACKGROUND_WIDTH ;
330+ this . _scroller . height = BACKGROUND_HEIGHT ;
331+ this . _viewPort . height = LARGE_VIEW_PORT_HEIGHT ;
332+ this . _scroller . validate ();
333+ this . _scroller . verticalScrollPosition = this . _scroller . maxVerticalScrollPosition / 2 ;
334+ this . _scroller . validate ();
335+ Assert. assertStrictlyEquals("The mask y position of the scroller's view port was not calculated correctly with verticalScrollPosition > 0." ,
336+ this . _scroller . maxVerticalScrollPosition / 2 , this . _viewPort . mask . y );
337+ }
338+
313339 [Test ]
314340 public function testAutoHideBackgroundWithoutScrolling ():void
315341 {
You can’t perform that action at this time.
0 commit comments