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

Unified Diff: ui/views/widget/widget_unittest.cc

Issue 2090003002: MacViews: Explicitly release mouse capture in BridgedNativeWidget::OnWindowWillClose(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/widget_unittest.cc
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index 8761f7f5cc83857e0164d4f81eb654e02b4c555d..373aa137511177e63b9f126e92f83f15c7b85921 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -1774,6 +1774,15 @@ TEST_F(WidgetTest, MousePressCausesCapture) {
widget->CloseNow();
}
+// Verify capture is correctly set on a widget. Test for crbug.com/622201.
tapted 2016/06/23 02:26:28 This doesn't describe the test well. It should be
karandeepb 2016/06/23 07:58:32 Done.
+TEST_F(WidgetTest, VerifyWindowCapture) {
+ Widget* widget = CreateTopLevelNativeWidget();
tapted 2016/06/23 02:26:28 We should use CreateNativeDesktopWidget() for bett
karandeepb 2016/06/23 07:58:32 Why is moving to widget_interactive_uitest.cc need
tapted 2016/06/24 07:11:58 Capture has complex interactions with the OS somet
+ widget->Show();
+ widget->native_widget_private()->SetCapture();
+ EXPECT_TRUE(widget->HasCapture());
+ widget->CloseNow();
tapted 2016/06/23 02:26:28 We should test asynchronous Close() as well, since
karandeepb 2016/06/23 07:58:32 Done.
+}
+
namespace {
// An EventHandler which shows a Wiget upon receiving a mouse event. The Widget
« ui/views/cocoa/bridged_native_widget.mm ('K') | « ui/views/cocoa/bridged_native_widget.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698