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

Unified Diff: ios/web/web_state/web_state_impl_unittest.mm

Issue 1905393002: [ios] Added WebState::GetLoadingProgress web// API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing method Created 4 years, 8 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 | « ios/web/web_state/web_state_impl.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/web_state_impl_unittest.mm
diff --git a/ios/web/web_state/web_state_impl_unittest.mm b/ios/web/web_state/web_state_impl_unittest.mm
index 9745c65b246e66a10522d91dd8a895ddc3bf397a..a2eb6d079c7d4d264724abf7d1f39001d3354293 100644
--- a/ios/web/web_state/web_state_impl_unittest.mm
+++ b/ios/web/web_state/web_state_impl_unittest.mm
@@ -594,5 +594,14 @@ TEST_F(WebStateTest, ScriptExecution) {
EXPECT_EQ("bar", string_result);
}
+// Tests loading progress.
+TEST_F(WebStateTest, LoadingProgress) {
+ EXPECT_FLOAT_EQ(0.0, web_state_->GetLoadingProgress());
+ LoadHtml("<html></html>");
+ base::test::ios::WaitUntilCondition(^bool() {
+ return web_state_->GetLoadingProgress() == 1.0;
+ });
+}
+
} // namespace
} // namespace web
« no previous file with comments | « ios/web/web_state/web_state_impl.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698