It seems that when launching an Earl Grey test suite (or a single test?) the first NTP displayed is retained even if it is not displayed on screen.
This behavior is not observed when using the real app.
This can be reproduce by launching Earl Grey and checking the memory debugger graph, there is something retaining it.
It was seen on the current app, launching testRecentTabSigninPromoReloaded and testRecentTabSigninPromoReloadedWhileHidden then another test (in that case, the first SigninTestCase test). In the other test, you can see that the recent tabs panel is not deallocated.
Please note that jlebel@ is working to convert the RecentTabs tests to the new Bookmark UI which will probably hide this problem.
I also encountered it while writing test for ContentSuggestions, where I had an error due to a ContentSuggestions NTP being retained even if it wasn't on screen.
Assigning to baxley as this is probably something linked to Earl Grey. Please reassign if needed.
Comment 1 by jlebel@chromium.org
, Dec 20 2017