Index: ios/web_view/test/web_view_test_util.h |
diff --git a/ios/web_view/test/web_view_test_util.h b/ios/web_view/test/web_view_test_util.h |
index 79a36708fac86accd582e64f9862766a09364242..fbf604bf12992e18faf09f83f37ecdba2d59d86b 100644 |
--- a/ios/web_view/test/web_view_test_util.h |
+++ b/ios/web_view/test/web_view_test_util.h |
@@ -7,17 +7,24 @@ |
#import <Foundation/Foundation.h> |
+#include "base/compiler_specific.h" |
+ |
@class CWVWebView; |
namespace ios_web_view { |
namespace test { |
// Creates web view with default configuration and frame equal to screen bounds. |
-CWVWebView* CreateWebView(); |
+CWVWebView* CreateWebView() WARN_UNUSED_RESULT; |
+ |
+// Loads |URL| in |web_view| and waits until the load completes. Asserts if |
+// loading does not complete. |
+bool LoadUrl(CWVWebView* web_view, NSURL* url) WARN_UNUSED_RESULT; |
// Returns whether the element with |element_id| in the passed |web_view| has |
// been tapped using a JavaScript click() event. |
-bool TapChromeWebViewElementWithId(CWVWebView* web_view, NSString* element_id); |
+bool TapWebViewElementWithId(CWVWebView* web_view, |
+ NSString* element_id) WARN_UNUSED_RESULT; |
// Waits until |script| is executed and synchronously returns the evaluation |
// result. |
@@ -26,7 +33,12 @@ id EvaluateJavaScript(CWVWebView* web_view, NSString* script, NSError** error); |
// Waits for |web_view| to contain |text|. Returns false if the condition is not |
// met within a timeout. |
bool WaitForWebViewContainingTextOrTimeout(CWVWebView* web_view, |
- NSString* text); |
+ NSString* text) WARN_UNUSED_RESULT; |
+ |
+// Waits until |web_view| stops loading. Returns false if the condition is not |
+// met within a timeout. |
+bool WaitForWebViewLoadCompletionOrTimeout(CWVWebView* web_view) |
+ WARN_UNUSED_RESULT; |
} // namespace test |
} // namespace ios_web_view |