| Index: chrome/browser/ui/webui/options/options_ui_browsertest.cc
|
| diff --git a/chrome/browser/ui/webui/options/options_ui_browsertest.cc b/chrome/browser/ui/webui/options/options_ui_browsertest.cc
|
| index 0313cc4dc807768ea539470a91e448dd47a52524..5d8a70ad958d0a11769a3e23e671b4538eaf3a0b 100644
|
| --- a/chrome/browser/ui/webui/options/options_ui_browsertest.cc
|
| +++ b/chrome/browser/ui/webui/options/options_ui_browsertest.cc
|
| @@ -130,6 +130,13 @@ void OptionsUIBrowserTest::NavigateToSettingsSubpage(
|
| subscription = options_ui->RegisterOnFinishedLoadingCallback(
|
| message_loop_runner->QuitClosure());
|
| message_loop_runner->Run();
|
| +
|
| + // The OnFinishedLoading event, which indicates that all WebUI initialization
|
| + // methods have been called on the JS side, is temporally unrelated to whether
|
| + // or not the WebContents considers itself to have finished loading. We want
|
| + // to wait for this too, however, because, e.g. this is a sufficient condition
|
| + // to get the focus properly placed on a form element.
|
| + content::WaitForLoadStop(web_contents);
|
| }
|
|
|
| void OptionsUIBrowserTest::NavigateToSettingsFrame() {
|
|
|