Commit 5692c0e0 authored by Eugene But's avatar Eugene But Committed by Commit Bot

Updated WebTestWithWebState::LoadHtml comments.

Comments explain the reason for recursive LoadHtml retry.

Bug: None
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Icd2b9a93e127500759c61a7e051e92ddc02df727
Reviewed-on: https://chromium-review.googlesource.com/926574
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: default avatarMike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537827}
parent e4e004ca
...@@ -125,7 +125,9 @@ void WebTestWithWebState::LoadHtml(NSString* html, const GURL& url) { ...@@ -125,7 +125,9 @@ void WebTestWithWebState::LoadHtml(NSString* html, const GURL& url) {
return web_controller.loadPhase == PAGE_LOADED; return web_controller.loadPhase == PAGE_LOADED;
}); });
// Reload the page if script execution is not possible. // Reload the page if script execution is not possible. Script execution will
// fail if WKUserScript was not injected by WKWebView (which sometimes happens
// after -[WKWebView loadHTMLString:baseURL:]).
if (![ExecuteJavaScript(@"0;") isEqual:@0]) { if (![ExecuteJavaScript(@"0;") isEqual:@0]) {
LoadHtml(html, url); LoadHtml(html, url);
} }
......
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