Explicitly layout child views to get their bounds set correctly in test
The unexpected behavior sanitizer picked up an issue in ToolbarAccountIconContainerViewBrowserTest.ShouldUpdateHighlightInNormalWindow where |save_card_icon| was reporting an incorrect size. The problem is that |save_card_icon| was reporting it's bounds as (0, 0). This was happening on both Linux and Windows. The size would then be used as a divisor. Floating point division-by-zero behavior isn't defined in the C/C++ spec and it's up to the compiler implementation. Windows (clang) will return NaN while Linux (gcc/g++) will raise an exception. The fix is to have the parent view, |container| reapply the layout after setting |save_card_icon| to visible. This will set the bounds of |save_card_info| correctly. Change-Id: I51796979292c0a65d40a28aeb5a255a80acae510 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2110396Reviewed-by:Dana Fried <dfried@chromium.org> Commit-Queue: John Pham <johnp@microsoft.com> Cr-Commit-Position: refs/heads/master@{#752086}
Showing
Please register or sign in to comment