Commit 5ac6238b authored by Anupam Snigdha's avatar Anupam Snigdha Committed by Commit Bot

Remove redundant wait for title change

The tests already have |Wait| and |OnSuccess| that would process all
the messages required for the tests. Removing these redundant calls to
wait for the title changes as this leads to flakiness.

Bug: 1108551
Change-Id: Id3bf340b5e02697d8a7c847c31cf1bfddd5b59cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2316801Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Anupam Snigdha <snianu@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#791363}
parent 4922ad73
...@@ -219,7 +219,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, ShowVK) { ...@@ -219,7 +219,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, ShowVK) {
ui_controls::PRESS, 1, ui_controls::PRESS, 1,
bounds.x() + kTextAreaWidth / 2 + kTextAreaOffsetX * 2, bounds.x() + kTextAreaWidth / 2 + kTextAreaOffsetX * 2,
bounds.y() + kTextAreaHeight / 2)); bounds.y() + kTextAreaHeight / 2));
WaitForTitle("focusin3");
type_observer_auto.Wait(); type_observer_auto.Wait();
} }
...@@ -250,7 +249,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, DontShowVKOnJSFocus) { ...@@ -250,7 +249,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, DontShowVKOnJSFocus) {
ui_controls::PRESS, 1, ui_controls::PRESS, 1,
bounds.x() + kTextAreaWidth / 2 + kTextAreaOffsetX * 2, bounds.x() + kTextAreaWidth / 2 + kTextAreaOffsetX * 2,
bounds.y() + kTextAreaHeight / 2)); bounds.y() + kTextAreaHeight / 2));
WaitForTitle("focusin3");
show_ime_observer_true.Wait(); show_ime_observer_true.Wait();
} }
...@@ -272,7 +270,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, HideVK) { ...@@ -272,7 +270,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, HideVK) {
ASSERT_TRUE(ui_controls::SendTouchEvents( ASSERT_TRUE(ui_controls::SendTouchEvents(
ui_controls::PRESS, 1, bounds.x() + kTextAreaWidth / 2 + kTextAreaOffsetX, ui_controls::PRESS, 1, bounds.x() + kTextAreaWidth / 2 + kTextAreaOffsetX,
bounds.y() + kTextAreaHeight / 2)); bounds.y() + kTextAreaHeight / 2));
WaitForTitle("focusin2");
type_observer_hide.Wait(); type_observer_hide.Wait();
} }
...@@ -296,7 +293,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, ShowAndThenHideVK) { ...@@ -296,7 +293,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, ShowAndThenHideVK) {
ASSERT_TRUE(ui_controls::SendTouchEvents(ui_controls::PRESS, 1, ASSERT_TRUE(ui_controls::SendTouchEvents(ui_controls::PRESS, 1,
bounds.x() + kTextAreaWidth / 2, bounds.x() + kTextAreaWidth / 2,
bounds.y() + kTextAreaHeight / 2)); bounds.y() + kTextAreaHeight / 2));
WaitForTitle("focusin1");
type_observer_show.Wait(); type_observer_show.Wait();
TextInputManagerVkVisibilityRequestObserver type_observer_hide( TextInputManagerVkVisibilityRequestObserver type_observer_hide(
GetActiveWebContents(), GetActiveWebContents(),
...@@ -304,7 +300,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, ShowAndThenHideVK) { ...@@ -304,7 +300,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, ShowAndThenHideVK) {
ASSERT_TRUE(ui_controls::SendTouchEvents( ASSERT_TRUE(ui_controls::SendTouchEvents(
ui_controls::PRESS, 1, bounds.x() + kTextAreaWidth / 2 + kTextAreaOffsetX, ui_controls::PRESS, 1, bounds.x() + kTextAreaWidth / 2 + kTextAreaOffsetX,
bounds.y() + kTextAreaHeight / 2)); bounds.y() + kTextAreaHeight / 2));
WaitForTitle("focusin2");
type_observer_hide.Wait(); type_observer_hide.Wait();
} }
...@@ -328,7 +323,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, ShowAndThenHideVKOnKeyDown) { ...@@ -328,7 +323,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, ShowAndThenHideVKOnKeyDown) {
ASSERT_TRUE(ui_controls::SendTouchEvents(ui_controls::PRESS, 1, ASSERT_TRUE(ui_controls::SendTouchEvents(ui_controls::PRESS, 1,
bounds.x() + kTextAreaWidth / 2, bounds.x() + kTextAreaWidth / 2,
bounds.y() + kTextAreaHeight / 2)); bounds.y() + kTextAreaHeight / 2));
WaitForTitle("focusin1");
type_observer_show.Wait(); type_observer_show.Wait();
TextInputManagerVkVisibilityRequestObserver type_observer_hide( TextInputManagerVkVisibilityRequestObserver type_observer_hide(
GetActiveWebContents(), GetActiveWebContents(),
...@@ -336,7 +330,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, ShowAndThenHideVKOnKeyDown) { ...@@ -336,7 +330,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, ShowAndThenHideVKOnKeyDown) {
ASSERT_TRUE(ui_controls::SendKeyPress(GetWindow()->GetNativeWindow(), ASSERT_TRUE(ui_controls::SendKeyPress(GetWindow()->GetNativeWindow(),
ui::VKEY_RETURN, false, false, false, ui::VKEY_RETURN, false, false, false,
false)); false));
WaitForTitle("KeyDown1");
type_observer_hide.Wait(); type_observer_hide.Wait();
} }
...@@ -359,7 +352,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, ...@@ -359,7 +352,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest,
ui_controls::PRESS, 1, ui_controls::PRESS, 1,
bounds.x() + kTextAreaWidth / 2 + kTextAreaOffsetX * 8, bounds.x() + kTextAreaWidth / 2 + kTextAreaOffsetX * 8,
bounds.y() + kTextAreaHeight / 2)); bounds.y() + kTextAreaHeight / 2));
WaitForTitle("focusin5");
type_observer_none.Wait(); type_observer_none.Wait();
} }
...@@ -385,7 +377,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, ...@@ -385,7 +377,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest,
ui_controls::PRESS, 1, ui_controls::PRESS, 1,
bounds.x() + kTextAreaWidth / 2 + kTextAreaOffsetX * 4, bounds.x() + kTextAreaWidth / 2 + kTextAreaOffsetX * 4,
bounds.y() + kTextAreaHeight / 2)); bounds.y() + kTextAreaHeight / 2));
WaitForTitle("focusin4");
type_observer_show.Wait(); type_observer_show.Wait();
TextInputManagerVkVisibilityRequestObserver type_observer_hide( TextInputManagerVkVisibilityRequestObserver type_observer_hide(
GetActiveWebContents(), GetActiveWebContents(),
...@@ -393,7 +384,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest, ...@@ -393,7 +384,6 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardPolicyTest,
ASSERT_TRUE(ui_controls::SendKeyPress(GetWindow()->GetNativeWindow(), ASSERT_TRUE(ui_controls::SendKeyPress(GetWindow()->GetNativeWindow(),
ui::VKEY_RETURN, false, false, false, ui::VKEY_RETURN, false, false, false,
false)); false));
WaitForTitle("hidevkin4");
type_observer_hide.Wait(); type_observer_hide.Wait();
} }
......
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