Class mozilla.components.browser.menu.view.StickyItemsLinearLayoutManagerTest

49

tests

0

failures

0

ignored

1.091s

duration

100%

successful

Tests

Test Duration Result
GIVEN A SILLM WHEN scrollVerticallyBy is called THEN it detaches the sticky item to scroll using parent and not updates the sticky item 0.003s passed
GIVEN SILLM WHEN createStickyView is called THEN a new View is created and cached in stickyItemView 0.003s passed
GIVEN a SILLM WHEN a new instance is contructed THEN it has specific default values 0s passed
GIVEN a SILLM WHEN bindStickyItem is called for a new View THEN the view is measured and layout 0.001s passed
GIVEN a SILLM WHEN computeScrollVectorForPosition is called THEN it detaches the sticky item to call the super method 0.002s passed
GIVEN a SILLM WHEN computeVerticalScrollExtent is called THEN it detaches the sticky item to call the super method 0.001s passed
GIVEN a SILLM WHEN computeVerticalScrollOffset is called THEN it detaches the sticky item to call the super method 0.002s passed
GIVEN a SILLM WHEN computeVerticalScrollRange is called THEN it detaches the sticky item to call the super method 0.002s passed
GIVEN a SILLM WHEN findFirstCompletelyVisibleItemPosition is called THEN it detaches the sticky item to call the super method 0.001s passed
GIVEN a SILLM WHEN findFirstVisibleItemPosition is called THEN it detaches the sticky item to call the super method 0.002s passed
GIVEN a SILLM WHEN findLastCompletelyVisibleItemPosition is called THEN it detaches the sticky item to call the super method 0.002s passed
GIVEN a SILLM WHEN findLastVisibleItemPosition is called THEN it detaches the sticky item to call the super method 0.003s passed
GIVEN a SILLM WHEN getAdapterPositionForItemIndex is called with a index for which there is no bound view THEN it returns -1 0s passed
GIVEN a SILLM WHEN getAdapterPositionForItemIndex is called with a index of an existing view THEN it returns it's absoluteAdapterPosition 0.075s passed
GIVEN a SILLM WHEN is called with a new position and offset THEN they are cached in scrollPosition and scrollOffset properties 0.001s passed
GIVEN a SILLM WHEN measureAndLayout is called for a new View THEN it is measured and layout 0.003s passed
GIVEN a SILLM WHEN onAttachedToWindow called THEN it calls super and sets the new adapter 0.372s passed
GIVEN a SILLM WHEN onLayoutChildren is called while in preLayout THEN it execute the super with the sticky item detached and not updates stickyItem 0.004s passed
GIVEN a SILLM WHEN onLayoutChildren is called while not in preLayout THEN it execute the super with the sticky item detached and updates stickyItem 0.088s passed
GIVEN a SILLM WHEN onRestoreInstanceState is called with a new state THEN it updates scrollPosition and scrollOffset 0.001s passed
GIVEN a SILLM WHEN onRestoreInstanceState is called with a null state THEN scrollPosition and scrollOffset are left unchanged 0.001s passed
GIVEN a SILLM WHEN onSaveInstanceState called THEN it returns a new SavedState with the scroll data 0.002s passed
GIVEN a SILLM WHEN recycleStickyItem is called THEN the view holder is reset and allowed to be recycled 0.220s passed
GIVEN a SILLM WHEN restoreView is called with a method parameter THEN the sticky item is detached, method executed, item reattached 0.007s passed
GIVEN a SILLM WHEN setAdapter is called with a new valid adapter THEN the current adapter is reset 0.084s passed
GIVEN a SILLM WHEN setAdapter is called with a null argument THEN the current adapter and stickyItem are set to null 0.001s passed
GIVEN a pending scroll WHEN bindStickyItem is called for a new View THEN a OnGlobalLayoutListener is set 0.003s passed
GIVEN an ItemPositionsAdapterDataObserver WHEN calculateNewStickyItemPosition is called for a bottom item the sticky position is last in adaptor 0.002s passed
GIVEN an ItemPositionsAdapterDataObserver WHEN calculateNewStickyItemPosition is called for a top item the sticky position is first in adaptor 0.001s passed
GIVEN an ItemPositionsAdapterDataObserver WHEN handleChange is called THEN the sticky item is updated 0.003s passed
GIVEN an ItemPositionsAdapterDataObserver WHEN onChanged is called THEN handleChange() is delegated 0.001s passed
GIVEN an ItemPositionsAdapterDataObserver WHEN onItemRangeInserted is called THEN handleChange() is delegated 0.001s passed
GIVEN an ItemPositionsAdapterDataObserver WHEN onItemRangeMoved is called THEN handleChange() is delegated 0.002s passed
GIVEN an ItemPositionsAdapterDataObserver WHEN onItemRangeRemoved is called THEN handleChange() is delegated 0.001s passed
GIVEN no pending scroll WHEN bindStickyItem is called for a new View THEN no OnGlobalLayoutListener is set 0.087s passed
GIVEN sticky item is not null WHEN scrollToPosition is called THEN it calls scrollToPositionWithOffset with INVALID_OFFSET 0.002s passed
GIVEN sticky item is not null WHEN scrollToPositionWithOffset is called THEN scrollToIndicatedPositionWithOffset is delegated 0.085s passed
GIVEN sticky item is null WHEN onFocusSearchFailed is called THEN it detaches the sticky item to call the super method 0.003s passed
GIVEN sticky item is null WHEN scrollToPosition is called THEN scrollToPositionWithOffset is not called 0.001s passed
GIVEN sticky item should be shown WHEN updateStickyItem is called while layout THEN bindStickyItem is called 0.002s passed
GIVEN sticky item should be shown WHEN updateStickyItem is called while not layout THEN bindStickyItem is not called 0.003s passed
GIVEN sticky item should be shown and exists WHEN updateStickyItem is called THEN another stickyItemView is not created 0.003s passed
GIVEN sticky item should be shown and it's view exists WHEN updateStickyItem is called THEN the stickyItemView gets set a new Y translation 0.004s passed
GIVEN sticky item should be shown and not exists WHEN updateStickyItem is called THEN a new stickyItemView is created 0.002s passed
GIVEN sticky item should not be shown WHEN updateStickyItem is called THEN the stickyItemView is recycled 0.001s passed
WHEN get is called for a not reversed StickyItemPlacement#BOTTOM layout manager THEN a StickyFooterLinearLayoutManager is returned 0.001s passed
WHEN get is called for a not reversed StickyItemPlacement#TOP layout manager THEN a StickyHeaderLinearLayoutManager is returned 0.001s passed
WHEN get is called for a reversed StickyItemPlacement#BOTTOM layout manager THEN a StickyFooterLinearLayoutManager is returned 0.001s passed
WHEN get is called for a reversed StickyItemPlacement#TOP layout manager THEN a StickyHeaderLinearLayoutManager is returned 0s passed