DescriptionFix flaky test OneClickSigninBubbleViewBrowserTest::ShowBubble
This CL makes tests for OneClickSigninBubbleView stable.
Problem: OneClickSigninBubbleViewBrowserTest::ShowBubble was flaky because it was focus sensitive: a bubble is dismissed whenever it looses focus and external events can change the focus during a browser_tests.
Solution:
Move the test cases in unit_tests, with ViewsTestBase as a base class. ViewsTestBase creates an environment in which real OS events are not forwarded to widgets, so the bubble is never dismissed.
The "Advanced" link cannot be opened without a browser, an ExtensionService and a ProfileManager. For that reason, a delegate has been created to handle clicks on links. This delegate is tested in browser_tests.
According to http://dev.chromium.org/developers/testing/browser-tests, tests that are focus sensitive should be in interactive_ui_tests. However, the test is still flaky when it's simply moved to interactive_ui_tests. An unexpected call to HWNDMessageHandler::OnWndProc with message == WM_KILLFOCUS dismisses the bubble.
TEST=Execute the tests (unit_tests:OneClickSigninBubbleViewTest and browser_tests:OneClickSigninBubbleLinksDelegateBrowserTest) multiple times. They should never fail.
BUG=259344
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=214758
Patch Set 1 #
Total comments: 2
Patch Set 2 : Upload for testing #Patch Set 3 : Upload for testing #Patch Set 4 : Upload for testing #Patch Set 5 : Unit tests for OneClickSigninBubbleView, browser tests for OneClickSigninBubbleLinksDelegate #Patch Set 6 : Hide the bubble in TearDown #Patch Set 7 : Improve style #
Total comments: 1
Patch Set 8 : Style improvement requested by Brian #
Total comments: 2
Patch Set 9 : #Patch Set 10 : Rebase #Messages
Total messages: 17 (0 generated)
|