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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « ios/web/web_state/web_state_impl.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ios/web/web_state/web_state_impl.h" 5 #include "ios/web/web_state/web_state_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 })); 587 }));
588 base::test::ios::WaitUntilCondition(^bool() { 588 base::test::ios::WaitUntilCondition(^bool() {
589 return execution_result.get(); 589 return execution_result.get();
590 }); 590 });
591 591
592 std::string string_result; 592 std::string string_result;
593 execution_result->GetAsString(&string_result); 593 execution_result->GetAsString(&string_result);
594 EXPECT_EQ("bar", string_result); 594 EXPECT_EQ("bar", string_result);
595 } 595 }
596 596
597 // Tests loading progress.
598 TEST_F(WebStateTest, LoadingProgress) {
599 EXPECT_FLOAT_EQ(0.0, web_state_->GetLoadingProgress());
600 LoadHtml("<html></html>");
601 base::test::ios::WaitUntilCondition(^bool() {
602 return web_state_->GetLoadingProgress() == 1.0;
603 });
604 }
605
597 } // namespace 606 } // namespace
598 } // namespace web 607 } // namespace web
OLDNEW
« 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