Commit 35c15596 authored by davidben@chromium.org's avatar davidben@chromium.org

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
parent 18f49b50
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment