Our tab-under blocking logic uses the following classification
// Currently, navigations are considered tab-unders if:
// 1. It is a navigation that is "suspicious"
// a. It has no user gesture.
// b. It is renderer-initiated.
// c. It is cross origin to the last committed URL in the tab.
// 2. The tab has opened a popup and hasn't received a user gesture since then.
// This information is tracked by the PopupOpenerTabHelper.
Currently, we look at the popup condition (2), on every redirect. This leads to strange behavior if the popup condition changes after the navigation starts:
1. Navigate to a.com
2. Start a navigation without a user gesture to b.com, it is not blocked
3. Open a popup, via direct user interaction with a.com
4. Navigation from (2) redirects and is blocked
We should fix this by computing the popup condition at navigation start and merely checking if redirects are classified as "suspicious".
Comment 1 by bugdroid1@chromium.org
, Mar 1 2018