Chromium Code Reviews
DescriptionAdd WidgetTest::GetAllWidgets() to find dialogs created by TestBrowserDialog.
TestBrowserDialog currently fails to detect some browser dialogs on
Windows 10.
This is because TestBrowserDialog uses the set difference from calls to
Widget::GetAllChildWidgets() to detect when a dialog is added to a
browser window. On Aura, this is populated from Aura child windows (in
the same WindowTreeHost). However, a parented Widget using a
DesktopNativeWidgetAura (e.g. for a top-level Widget on Windows Aero),
rather than a NativeWidgetAura, will not be reported in its parent
window's "GetAllChildWidgets()" (nor in Widget::GetAllOwnedWidgets()).
Ownership of these top-level Widgets is managed in mus-, win-, or
x11-specific code.
To fix, add WidgetTest::GetAllWidgets() which just returns all Widget*s
that can be found in the current process.
In addition, this approach is able to detect Widgets created with no
parent at all, such as the HungRenderer dialog.
BUG=683808, 654151
Review-Url: https://codereview.chromium.org/2660813002
Cr-Commit-Position: refs/heads/master@{#447216}
Committed: https://chromium.googlesource.com/chromium/src/+/3b39bb8d4942bbf79cbd36f24ae8a861e3f78fa4
Patch Set 1 #Patch Set 2 : Fix CrOS maybe? #Patch Set 3 : fix mac #
Total comments: 6
Patch Set 4 : respond to comments #
Messages
Total messages: 28 (22 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||