Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Unified Diff: ios/web/public/test/web_test_with_web_state.mm

Issue 2321843002: [ios] Reload the page inside WebTestWithWebState::LoadHtml if necessary. (Closed)
Patch Set: - Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/test/web_test_with_web_state.mm
diff --git a/ios/web/public/test/web_test_with_web_state.mm b/ios/web/public/test/web_test_with_web_state.mm
index b3c67a6afbd7a0166e2f41356aba4d9ef8628386..764731d9501a51cfee827324e24572d597d94fe2 100644
--- a/ios/web/public/test/web_test_with_web_state.mm
+++ b/ios/web/public/test/web_test_with_web_state.mm
@@ -71,10 +71,10 @@ void WebTestWithWebState::LoadHtml(NSString* html, const GURL& url) {
return web_controller.loadPhase == PAGE_LOADED;
});
- // Wait until scripts execution becomes possible.
- base::test::ios::WaitUntilCondition(^bool {
- return [ExecuteJavaScript(@"0;") isEqual:@0];
- });
+ // Reload the page if script execution is not possible.
+ if (![ExecuteJavaScript(@"0;") isEqual:@0]) {
+ LoadHtml(html, url);
+ }
}
void WebTestWithWebState::LoadHtml(NSString* html) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698