Fix NavigationControllerTest PostThenReplaceStateThenReload test
This test is passing, but doesn't actually do anything for a couple of reasons: 1. The first POST commit used a deprecated style of navigation without a NavigationEntry this fails automatically with bad message 216 since cross-document navigations require a NavigationEntry in RenderFrameHostImpl::DidCommitNavigationInternal(). This is fixed by using NavigationSimulator. 2. In NavigationControllerImpl g_check_for_repost is set to false for all tests. Even if a repost happened in this test the repost dialog would never show or increment the counter. This is fixed by adding a Scoped*ForTesting class similar to those for thread restrictions to permit showing a repost dialog in a test. I'm surprised the bad message didn't trigger a test failure... Bug: 1095727 Change-Id: I32906017fe2b931d459544b27c437691b92e08a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2247079Reviewed-by:Camille Lamy <clamy@chromium.org> Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org> Cr-Commit-Position: refs/heads/master@{#779387}
Showing
Please register or sign in to comment