diff options
author | tapted <tapted@chromium.org> | 2015-05-11 16:11:54 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-11 23:13:01 +0000 |
commit | 5f19016c6780aba48125ce089f00c9f0b98e8e92 (patch) | |
tree | 551b95154f4674e4799dcba0f58c9aee2e631640 | |
parent | 0a8c2754afbae766a5db45ead34d0154e8b03997 (diff) | |
download | chromium_src-5f19016c6780aba48125ce089f00c9f0b98e8e92.zip chromium_src-5f19016c6780aba48125ce089f00c9f0b98e8e92.tar.gz chromium_src-5f19016c6780aba48125ce089f00c9f0b98e8e92.tar.bz2 |
Deflake WidgetInputMethodInteractiveTest.TwoTopWindows on Linux
I was able to repro the flake with ~1% probability and traced.
It was flaky because earlier window server messages were still pending
when the test started running checks. So the first `ActivateSync` would
actually break out of the message loop wait too soon.
BUG=484836
Review URL: https://codereview.chromium.org/1130683004
Cr-Commit-Position: refs/heads/master@{#329267}
-rw-r--r-- | ui/views/widget/widget_interactive_uitest.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/views/widget/widget_interactive_uitest.cc b/ui/views/widget/widget_interactive_uitest.cc index f9d6605..5c27773 100644 --- a/ui/views/widget/widget_interactive_uitest.cc +++ b/ui/views/widget/widget_interactive_uitest.cc @@ -1582,8 +1582,7 @@ TEST_F(WidgetInputMethodInteractiveTest, TwoWindows) { // Test input method focus changes affected by focus changes cross 2 top // windows. -// Flaky: https://crbug.com/484836 -TEST_F(WidgetInputMethodInteractiveTest, DISABLED_TwoTopWindows) { +TEST_F(WidgetInputMethodInteractiveTest, TwoTopWindows) { Widget* widget1 = CreateWidget(); Widget* widget2 = CreateWidget(); Textfield* textfield1 = new Textfield; @@ -1591,8 +1590,11 @@ TEST_F(WidgetInputMethodInteractiveTest, DISABLED_TwoTopWindows) { textfield2->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD); widget1->GetRootView()->AddChildView(textfield1); widget2->GetRootView()->AddChildView(textfield2); - widget1->Show(); - widget2->Show(); + + // Do the initial shows synchronously. Otherwise, on X11, the window server + // messages may be interleaved with the activation requests below. + ShowSync(widget1); + ShowSync(widget2); textfield1->RequestFocus(); textfield2->RequestFocus(); |