Commit 2aaad002 authored by Eugene But's avatar Eugene But Committed by Commit Bot

Use WaitUntilConditionOrTimeout in CRWWebControllerPageScrollStateTest.

WaitUntilConditionOrTimeout replaces deprecated WaitUntilCondition.

Bug: 784735
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: I7be4ef5e89e72e2bdee8721a6be7fcaba96107a8
Reviewed-on: https://chromium-review.googlesource.com/1214425
Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org>
Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589986}
parent 1883bad4
...@@ -538,9 +538,9 @@ TEST_P(CRWWebControllerPageScrollStateTest, ...@@ -538,9 +538,9 @@ TEST_P(CRWWebControllerPageScrollStateTest,
[web_controller() restoreStateFromHistory]; [web_controller() restoreStateFromHistory];
// |-restoreStateFromHistory| is async; wait for its completion. // |-restoreStateFromHistory| is async; wait for its completion.
base::test::ios::WaitUntilCondition(^bool() { ASSERT_TRUE(WaitUntilConditionOrTimeout(kWaitForPageLoadTimeout, ^{
return web_controller().pageDisplayState.scroll_state().offset_x() == 1.0; return web_controller().pageDisplayState.scroll_state().offset_x() == 1.0;
}); }));
ASSERT_EQ(original_zoom_state, ASSERT_EQ(original_zoom_state,
web_controller().pageDisplayState.zoom_state()); web_controller().pageDisplayState.zoom_state());
...@@ -568,9 +568,9 @@ TEST_P(CRWWebControllerPageScrollStateTest, ...@@ -568,9 +568,9 @@ TEST_P(CRWWebControllerPageScrollStateTest,
[web_controller() restoreStateFromHistory]; [web_controller() restoreStateFromHistory];
// |-restoreStateFromHistory| is async; wait for its completion. // |-restoreStateFromHistory| is async; wait for its completion.
base::test::ios::WaitUntilCondition(^bool() { ASSERT_TRUE(WaitUntilConditionOrTimeout(kWaitForPageLoadTimeout, ^{
return web_controller().pageDisplayState.scroll_state().offset_x() == 1.0; return web_controller().pageDisplayState.scroll_state().offset_x() == 1.0;
}); }));
PageZoomState final_zoom_state = PageZoomState final_zoom_state =
web_controller().pageDisplayState.zoom_state(); web_controller().pageDisplayState.zoom_state();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment