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

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

Issue 1783423004: Reenabling the disabled DestroyInSysCommandNCLButtonDownOnCaption and SysCommandMoveOnNCLButtonDown… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget_unittest.cc
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index f68663bd1cf29c00fc2877a515d488d7517af1c2..874ebe9f4aceae1a964a1e03c4b3a0721970da7e 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -3269,8 +3269,7 @@ SubclassWindowHelper* SubclassWindowHelper::instance_ = nullptr;
// 1. Posting a WM_NCMOUSEMOVE message for a different location.
// 2. Posting a WM_NCMOUSEMOVE message with a different hittest code.
// 3. Posting a WM_MOUSEMOVE message.
-// Disabled because of flaky timeouts: http://crbug.com/592742
-TEST_F(WidgetTest, DISABLED_SysCommandMoveOnNCLButtonDownOnCaptionAndMoveTest) {
+TEST_F(WidgetTest, SysCommandMoveOnNCLButtonDownOnCaptionAndMoveTest) {
Widget widget;
Widget::InitParams params =
CreateParams(Widget::InitParams::TYPE_WINDOW);
@@ -3280,7 +3279,7 @@ TEST_F(WidgetTest, DISABLED_SysCommandMoveOnNCLButtonDownOnCaptionAndMoveTest) {
widget.Init(params);
widget.SetBounds(gfx::Rect(0, 0, 200, 200));
widget.Show();
- ::SetCursorPos(500, 500);
+ RunPendingMessages();
HWND window = widget.GetNativeWindow()->GetHost()->GetAcceleratedWidget();
@@ -3290,6 +3289,7 @@ TEST_F(WidgetTest, DISABLED_SysCommandMoveOnNCLButtonDownOnCaptionAndMoveTest) {
// WM_SYSCOMMAND
::PostMessage(window, WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(100, 100));
RunPendingMessages();
+
EXPECT_TRUE(subclass_helper.received_message(WM_NCLBUTTONDOWN));
EXPECT_FALSE(subclass_helper.received_message(WM_SYSCOMMAND));
@@ -3343,8 +3343,7 @@ TEST_F(WidgetTest, DISABLED_SysCommandMoveOnNCLButtonDownOnCaptionAndMoveTest) {
// This test validates that destroying the window in the context of the
// WM_SYSCOMMAND message with SC_MOVE does not crash.
-// Disabled because of flaky timeouts: http://crbug.com/592742
-TEST_F(WidgetTest, DISABLED_DestroyInSysCommandNCLButtonDownOnCaption) {
+TEST_F(WidgetTest, DestroyInSysCommandNCLButtonDownOnCaption) {
Widget widget;
Widget::InitParams params =
CreateParams(Widget::InitParams::TYPE_WINDOW);
@@ -3354,7 +3353,7 @@ TEST_F(WidgetTest, DISABLED_DestroyInSysCommandNCLButtonDownOnCaption) {
widget.Init(params);
widget.SetBounds(gfx::Rect(0, 0, 200, 200));
widget.Show();
- ::SetCursorPos(500, 500);
+ RunPendingMessages();
HWND window = widget.GetNativeWindow()->GetHost()->GetAcceleratedWidget();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698