prerender: Add NavigationOrSwapObserver in browsertest.
Prerender browser tests are currently sensitive to prerenders occurring synchronously. Already we require an ad-hoc content::RunMessageLoop() in PrerenderPageNewTab because that one is asynchronous. Instead, introduce a NavigationOrSwapObserver so NavigateToURL always waits for either the swap or a normal navigation. This allows removing the content::RunMessageLoop() call and is necessary for fixing beforeunload handling. Also split off DidDisplayPass and DidPrerenderPass into helper functions. BUG=307592,304932 TEST=PrerenderBrowserTest.* Review URL: https://codereview.chromium.org/102433010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243616 0039d316-1c4b-4281-b951-d872f2087c98
Showing
This diff is collapsed.
Please register or sign in to comment