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

Issue 18558009: Fix flaky test OneClickSigninBubbleViewBrowserTest::ShowBubble (Closed)

Created:
7 years, 5 months ago by fdoray
Modified:
7 years, 4 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Fix 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+289 lines, -362 lines) Patch
A chrome/browser/ui/sync/one_click_signin_bubble_delegate.h View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.h View 1 2 3 4 5 6 1 chunk +31 lines, -0 lines 0 comments Download
A chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.cc View 1 2 3 4 5 6 7 8 1 chunk +31 lines, -0 lines 0 comments Download
A chrome/browser/ui/sync/one_click_signin_bubble_links_delegate_browsertest.cc View 1 2 3 4 5 6 7 8 1 chunk +39 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 5 6 7 8 5 chunks +16 lines, -1 line 0 comments Download
M chrome/browser/ui/views/sync/one_click_signin_bubble_view.h View 1 2 3 4 5 6 5 chunks +19 lines, -22 lines 0 comments Download
M chrome/browser/ui/views/sync/one_click_signin_bubble_view.cc View 1 2 3 4 5 6 7 6 chunks +13 lines, -23 lines 0 comments Download
M chrome/browser/ui/views/sync/one_click_signin_bubble_view_browsertest.cc View 1 2 3 1 chunk +0 lines, -263 lines 0 comments Download
A + chrome/browser/ui/views/sync/one_click_signin_bubble_view_unittest.cc View 1 2 3 4 5 6 7 8 10 chunks +115 lines, -51 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
fdoray
Could you review this CL? The test case should be stable in interactive_ui_tests. I observed ...
7 years, 5 months ago (2013-07-11 14:10:49 UTC) #1
Roger Tawa OOO till Jul 10th
lgtm
7 years, 5 months ago (2013-07-11 14:42:02 UTC) #2
noms
Hurray! lgtm
7 years, 5 months ago (2013-07-11 14:43:27 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fdoray@chromium.org/18558009/1
7 years, 5 months ago (2013-07-11 15:57:34 UTC) #4
bcwhite
lgtm
7 years, 5 months ago (2013-07-11 16:34:58 UTC) #5
fdoray
OneClickSigninBubbleViewBrowserTest.ShowBubble failed on win_rel in interactive_ui_tests... I will investigate this.
7 years, 5 months ago (2013-07-11 17:39:25 UTC) #6
bcwhite
LGTM https://codereview.chromium.org/18558009/diff/109001/chrome/browser/ui/views/sync/one_click_signin_bubble_view.cc File chrome/browser/ui/views/sync/one_click_signin_bubble_view.cc (right): https://codereview.chromium.org/18558009/diff/109001/chrome/browser/ui/views/sync/one_click_signin_bubble_view.cc#newcode63 chrome/browser/ui/views/sync/one_click_signin_bubble_view.cc:63: bubble_view_ = new OneClickSigninBubbleView(error_message, I think you should ...
7 years, 5 months ago (2013-07-25 20:16:14 UTC) #7
fdoray
Owners, could you review this CL? Thanks! akalin@ chrome/browser/ui/sync/* (The code was completely different when ...
7 years, 5 months ago (2013-07-25 21:10:09 UTC) #8
sky
https://codereview.chromium.org/18558009/diff/131001/chrome/browser/ui/views/sync/one_click_signin_bubble_view_unittest.cc File chrome/browser/ui/views/sync/one_click_signin_bubble_view_unittest.cc (right): https://codereview.chromium.org/18558009/diff/131001/chrome/browser/ui/views/sync/one_click_signin_bubble_view_unittest.cc#newcode35 chrome/browser/ui/views/sync/one_click_signin_bubble_view_unittest.cc:35: views::Widget* widget = new views::Widget; Who owns this?
7 years, 5 months ago (2013-07-25 21:42:28 UTC) #9
fdoray
Scott, could you review this again? https://codereview.chromium.org/18558009/diff/131001/chrome/browser/ui/views/sync/one_click_signin_bubble_view_unittest.cc File chrome/browser/ui/views/sync/one_click_signin_bubble_view_unittest.cc (right): https://codereview.chromium.org/18558009/diff/131001/chrome/browser/ui/views/sync/one_click_signin_bubble_view_unittest.cc#newcode35 chrome/browser/ui/views/sync/one_click_signin_bubble_view_unittest.cc:35: views::Widget* widget = ...
7 years, 5 months ago (2013-07-26 17:34:31 UTC) #10
sky
LGTM
7 years, 5 months ago (2013-07-26 19:23:00 UTC) #11
fdoray
Fred, could you review this? Thanks!
7 years, 4 months ago (2013-07-27 14:47:57 UTC) #12
fdoray
Andrew, could you review this? The code changed a lot since Roger LGTMed it and ...
7 years, 4 months ago (2013-07-29 18:26:42 UTC) #13
fdoray
-atwilson@ +tim@ Tim, could you review this? The code changed a lot since Roger LGTMed ...
7 years, 4 months ago (2013-07-29 18:30:00 UTC) #14
tim (not reviewing)
browser/ui/sync LGTM
7 years, 4 months ago (2013-07-30 21:39:47 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fdoray@chromium.org/18558009/156001
7 years, 4 months ago (2013-07-31 13:15:04 UTC) #16
commit-bot: I haz the power
7 years, 4 months ago (2013-07-31 16:49:15 UTC) #17
Message was sent while issue was closed.
Change committed as 214758

Powered by Google App Engine
This is Rietveld 408576698