SBBlockingPageTest currently relies on a quirk of ui_test_utils::NavigateToURL(): this implicitly loads "about:blank" followed by whatever URL you specify. This has implications for the tests:
* tests currently set `SBErrorDisplayOptions.always_show_back_to_safety = false` (the WebView config), yet assert "back to safety" button is always visible (only true because of this quirk)
* tests do *not* test `SBErrorDisplayOptions.always_show_back_to_safety = true` (the chrome config), and it's difficult to really do so because of this quirk (workaround: open in a new tab)
* tests assume back-to-safety goes to "about:blank" (only true because of quirk). I don't believe we ever test the product's real behavior for interstitials on the first navigation (should go back to NTP).
Carlos and I discovered this in http://crrev/c/1270476, but I don't think we can reasonably change all the tests in that CL. The best fix I can think of is to navigate in a new foreground tab for all tests to avoid relying on this. Then we can add proper tests for these UI edge cases on first navigation.
I'm filing this to see if Safe Browsing team intends this behavior, or if there's interest in changing the tests (but I won't have bandwidth to do so myself for the time being).
Comment 1 by vakh@chromium.org
, Oct 19