| 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 d5a95137910c33a6bc663a38b24c5294d9be9e0e..d16f409cc90343f0bbfd331f8f3adf33f18f4cbe 100644
|
| --- a/ios/web/public/test/web_test_with_web_state.mm
|
| +++ b/ios/web/public/test/web_test_with_web_state.mm
|
| @@ -155,10 +155,6 @@ id WebTestWithWebState::ExecuteJavaScript(NSString* script) {
|
| [GetWebController(web_state())
|
| executeJavaScript:script
|
| completionHandler:^(id result, NSError* error) {
|
| - if (error && error.code != WKErrorJavaScriptResultTypeIsUnsupported) {
|
| - NOTREACHED() << " error: " << error.code
|
| - << " for script: " << base::SysNSStringToUTF8(script);
|
| - }
|
| executionResult.reset([result copy]);
|
| executionCompleted = true;
|
| }];
|
| @@ -184,7 +180,7 @@ const web::WebState* WebTestWithWebState::web_state() const {
|
| bool WebTestWithWebState::ResetPageIfNavigationStalled(NSString* load_check) {
|
| id inner_html = ExecuteJavaScript(
|
| @"(document && document.body && document.body.innerHTML) || 'undefined'");
|
| - if ([inner_html rangeOfString:load_check].location == NSNotFound) {
|
| + if (![inner_html rangeOfString:load_check].length) {
|
| web_state_->SetWebUsageEnabled(false);
|
| web_state_->SetWebUsageEnabled(true);
|
| [GetWebController(web_state()) triggerPendingLoad];
|
|
|