• edchin's avatar
    [ios] Add test to update offscreen cells in tab grid · 5c1bb6af
    edchin authored
    A crash will occur when an scrolled offscreen cell is updated.
    This is because UICollectionView's |-cellForItemAtIndexPath:| returns
    nil if the cell is offscreen.
    
    This CL adds a unittest that fails without the fix, which is also
    in this CL. The fix is to skip cell configuration if the cell is nil.
    
    Bug: 851352
    Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
    Change-Id: Iccdb53e3a67b58f225a09ce32ac70f48d42431ef
    Reviewed-on: https://chromium-review.googlesource.com/1094210Reviewed-by: default avatarMark Cogan <marq@chromium.org>
    Reviewed-by: default avataredchin <edchin@chromium.org>
    Commit-Queue: edchin <edchin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#566733}
    5c1bb6af
root_view_controller_test.h 1.15 KB