Wait for url load in HostedAppTest.ShouldShowLocationBarDangerous
This CL fixes a race condition in the HostedAppTest.ShouldShowLocationBarDangerous test. This test sets an app, makes all further certificate validations to fail and then navigates inside the app to the app url. The test expects that an interstitial page will be shown after the navigation. Hovewer, there is a small probability that the nullptr will be returned from WebContents::GetInterstitialPage(). The reason is that another navigation is triggered when the app is created and the test doesn't wait for this navigation to complete before setting cert_verifier to return an error. Two navigations trying to display an interstitial page at the same time may make this test fail. The fix is simple, we just have to wait for the first navigation to complete before doing anything else. Bug: 851232 Change-Id: Ic3d55321efb23df726c8e178912704e15f3a54c8 Reviewed-on: https://chromium-review.googlesource.com/1097477Reviewed-by:Giovanni Ortuño Urquidi <ortuno@chromium.org> Commit-Queue: Alexandr Ilin <alexilin@chromium.org> Cr-Commit-Position: refs/heads/master@{#566773}
Showing
Please register or sign in to comment