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

Issue 1637383003: MacViews: Fix views_unittests BubbleDelegateTest.CloseReasons (Closed)

Created:
4 years, 10 months ago by Patti Lor
Modified:
4 years, 9 months ago
Reviewers:
tapted, msw
CC:
chromium-reviews, tfarina, msw+watch_chromium.org, groby+bubble_chromium.org, hcarmona+bubble_chromium.org, rouslan+bubble_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Fix views_unittests BubbleDelegateTest.CloseReasons Test added in r360848, fails on Mac as the bubble's parent anchor is not being shown before the bubble is expected to appear - this causes the bubble to be treated as 'hidden' as its parent is not visible. This should actually be expected behaviour on all platforms, so the failure is actually indicating there's a bug on Aura (see http://crbug/590957). Workaround this for now by showing the bubble's anchor widget first to allow this to pass for all platforms. Also add ScopedFakeNSWindowFocus to all tests to simulate focus on the parent, as well as defend against test flakiness which might be caused by window activation issues. BUG=579380, 590957 Committed: https://crrev.com/71d4b0f60b78186e0eff2a287a9a2036488836a8 Cr-Commit-Position: refs/heads/master@{#379499}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Verify bubble is visible after showing it. #

Patch Set 3 : Temporary patch to verify failure on other platforms. #

Patch Set 4 : Tentative fix for Aura not parenting bubbles properly, verify bubble invisible. #

Patch Set 5 : Fix type of params.child (bool, not ptr). #

Total comments: 4

Patch Set 6 : Change test behaviour based on Aura vs non-Aura. #

Total comments: 2

Patch Set 7 : Cleanup, use less ifdefs. #

Patch Set 8 : Fix ifndef (windows compile breaks). #

Total comments: 2

Patch Set 9 : Re-wrap comment. #

Total comments: 4

Patch Set 10 : Remove separate behaviour for Aura vs non-Aura. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -0 lines) Patch
M ui/views/bubble/bubble_delegate_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (14 generated)
Patti Lor
4 years, 10 months ago (2016-01-27 23:49:39 UTC) #5
tapted
https://codereview.chromium.org/1637383003/diff/1/ui/views/bubble/bubble_delegate_unittest.cc File ui/views/bubble/bubble_delegate_unittest.cc (right): https://codereview.chromium.org/1637383003/diff/1/ui/views/bubble/bubble_delegate_unittest.cc#newcode1 ui/views/bubble/bubble_delegate_unittest.cc:1: // Copyright (c) 2012 The Chromium Authors. All rights ...
4 years, 10 months ago (2016-01-28 02:50:53 UTC) #7
Patti Lor
Hi Trent, PTAL, it's still a WIP. The problem is that the bubble's layer isn't ...
4 years, 9 months ago (2016-03-01 00:30:47 UTC) #10
tapted
So, yes, I think this is a bug in Aura. (but we can't set child ...
4 years, 9 months ago (2016-03-01 02:42:39 UTC) #11
Patti Lor
Have checked the Chrome OS build, could you check Windows before I send for owners? ...
4 years, 9 months ago (2016-03-01 06:54:48 UTC) #12
tapted
https://chromiumcodereview.appspot.com/1637383003/diff/100001/ui/views/bubble/bubble_delegate_unittest.cc File ui/views/bubble/bubble_delegate_unittest.cc (right): https://chromiumcodereview.appspot.com/1637383003/diff/100001/ui/views/bubble/bubble_delegate_unittest.cc#newcode288 ui/views/bubble/bubble_delegate_unittest.cc:288: bubble_widget->Show(); Can we get the tests in sync for ...
4 years, 9 months ago (2016-03-01 07:09:23 UTC) #13
Patti Lor
PTAL, thank you. https://chromiumcodereview.appspot.com/1637383003/diff/100001/ui/views/bubble/bubble_delegate_unittest.cc File ui/views/bubble/bubble_delegate_unittest.cc (right): https://chromiumcodereview.appspot.com/1637383003/diff/100001/ui/views/bubble/bubble_delegate_unittest.cc#newcode288 ui/views/bubble/bubble_delegate_unittest.cc:288: bubble_widget->Show(); On 2016/03/01 07:09:23, tapted wrote: ...
4 years, 9 months ago (2016-03-02 01:45:10 UTC) #14
tapted
lgtm https://chromiumcodereview.appspot.com/1637383003/diff/140001/ui/views/bubble/bubble_delegate_unittest.cc File ui/views/bubble/bubble_delegate_unittest.cc (right): https://chromiumcodereview.appspot.com/1637383003/diff/140001/ui/views/bubble/bubble_delegate_unittest.cc#newcode291 ui/views/bubble/bubble_delegate_unittest.cc:291: // Bubbles are top-level which, on Aura, causes ...
4 years, 9 months ago (2016-03-03 08:08:50 UTC) #15
Patti Lor
Have also updated the CL description. +sky for OWNERS in ui/views/*, PTAL, thank you. https://chromiumcodereview.appspot.com/1637383003/diff/140001/ui/views/bubble/bubble_delegate_unittest.cc ...
4 years, 9 months ago (2016-03-03 23:24:33 UTC) #18
tapted
https://chromiumcodereview.appspot.com/1637383003/diff/160001/ui/views/bubble/bubble_delegate_unittest.cc File ui/views/bubble/bubble_delegate_unittest.cc (right): https://chromiumcodereview.appspot.com/1637383003/diff/160001/ui/views/bubble/bubble_delegate_unittest.cc#newcode74 ui/views/bubble/bubble_delegate_unittest.cc:74: ui::test::ScopedFakeNSWindowFocus fake_focus; oops - this should have an underscore ...
4 years, 9 months ago (2016-03-03 23:34:50 UTC) #19
sky1
sky->msw
4 years, 9 months ago (2016-03-04 00:12:17 UTC) #21
msw
Please cite 590957 in your CL description's BUG= https://chromiumcodereview.appspot.com/1637383003/diff/160001/ui/views/bubble/bubble_delegate_unittest.cc File ui/views/bubble/bubble_delegate_unittest.cc (right): https://chromiumcodereview.appspot.com/1637383003/diff/160001/ui/views/bubble/bubble_delegate_unittest.cc#newcode289 ui/views/bubble/bubble_delegate_unittest.cc:289: EXPECT_FALSE(anchor_widget->IsVisible()); ...
4 years, 9 months ago (2016-03-04 00:23:58 UTC) #22
Patti Lor
PTAL, thanks. https://chromiumcodereview.appspot.com/1637383003/diff/160001/ui/views/bubble/bubble_delegate_unittest.cc File ui/views/bubble/bubble_delegate_unittest.cc (right): https://chromiumcodereview.appspot.com/1637383003/diff/160001/ui/views/bubble/bubble_delegate_unittest.cc#newcode74 ui/views/bubble/bubble_delegate_unittest.cc:74: ui::test::ScopedFakeNSWindowFocus fake_focus; On 2016/03/03 23:34:50, tapted wrote: ...
4 years, 9 months ago (2016-03-04 06:27:11 UTC) #24
msw
lgtm, thanks
4 years, 9 months ago (2016-03-04 17:59:23 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1637383003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1637383003/180001
4 years, 9 months ago (2016-03-06 23:06:34 UTC) #28
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 9 months ago (2016-03-06 23:49:10 UTC) #29
commit-bot: I haz the power
4 years, 9 months ago (2016-03-06 23:50:13 UTC) #31
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/71d4b0f60b78186e0eff2a287a9a2036488836a8
Cr-Commit-Position: refs/heads/master@{#379499}

Powered by Google App Engine
This is Rietveld 408576698