Make autofill tests working with RenderDocument.

RenderDocument is making Chrome switching RenderFrameHost on each
Documents. RenderFrameHost are currently switched on each cross-process
navigations. In the future, they will be switched on each same-process
navigation as well.

The class autofill_uitest instruments the AutofillManager associated
with the current main RenderFrameHost. The tests assumes it will be
preserved. With RenderDocument, it will be swapped after each new

This CL makes the following RenderFrameHost to be instrumented as well.

Bug: 936696, 940935
Change-Id: I23f9785781df1b1921778d1ff6269d69e248ff92
Commit-Queue: Arthur Sonzogni <>
Reviewed-by: Sebastien Seguin-Gagnon <>
Cr-Commit-Position: refs/heads/master@{#641146}
2 files changed