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

Side by Side Diff: ui/views/widget/widget_unittest.cc

Issue 1817973002: Disabling flaky DesktopNativeWidgetNoPaintAfterHideTest (Closed) 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 #include <set> 6 #include <set>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 widget.InitForTest(CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS)); 1385 widget.InitForTest(CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS));
1386 RunPendingMessages(); 1386 RunPendingMessages();
1387 EXPECT_TRUE(widget.ReadReceivedPaintAndReset()); 1387 EXPECT_TRUE(widget.ReadReceivedPaintAndReset());
1388 widget.SchedulePaintInRect(widget.GetRestoredBounds()); 1388 widget.SchedulePaintInRect(widget.GetRestoredBounds());
1389 widget.Close(); 1389 widget.Close();
1390 RunPendingMessages(); 1390 RunPendingMessages();
1391 EXPECT_FALSE(widget.ReadReceivedPaintAndReset()); 1391 EXPECT_FALSE(widget.ReadReceivedPaintAndReset());
1392 EXPECT_FALSE(widget.received_paint_while_hidden()); 1392 EXPECT_FALSE(widget.received_paint_while_hidden());
1393 } 1393 }
1394 1394
1395 TEST_F(WidgetTest, DesktopNativeWidgetNoPaintAfterHideTest) { 1395 #if defined(OS_LINUX)
1396 #define MAYBE_DesktopNativeWidgetNoPaintAfterHideTest DISABLED_DesktopNativeWidg etNoPaintAfterHideTest
1397 #else
1398 #define MAYBE_DesktopNativeWidgetNoPaintAfterHideTest DesktopNativeWidgetNoPaint AfterHideTest
1399 #endif
1400 TEST_F(WidgetTest, MAYBE_DesktopNativeWidgetNoPaintAfterHideTest) {
1396 DesktopAuraTestValidPaintWidget widget; 1401 DesktopAuraTestValidPaintWidget widget;
1397 widget.InitForTest(CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS)); 1402 widget.InitForTest(CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS));
1398 RunPendingMessages(); 1403 RunPendingMessages();
1399 EXPECT_TRUE(widget.ReadReceivedPaintAndReset()); 1404 EXPECT_TRUE(widget.ReadReceivedPaintAndReset());
1400 widget.SchedulePaintInRect(widget.GetRestoredBounds()); 1405 widget.SchedulePaintInRect(widget.GetRestoredBounds());
1401 widget.Hide(); 1406 widget.Hide();
1402 RunPendingMessages(); 1407 RunPendingMessages();
1403 EXPECT_FALSE(widget.ReadReceivedPaintAndReset()); 1408 EXPECT_FALSE(widget.ReadReceivedPaintAndReset());
1404 EXPECT_FALSE(widget.received_paint_while_hidden()); 1409 EXPECT_FALSE(widget.received_paint_while_hidden());
1405 widget.Close(); 1410 widget.Close();
(...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after
3509 // Moving the child to a different widget should call the removals observer. 3514 // Moving the child to a different widget should call the removals observer.
3510 WidgetAutoclosePtr widget2(CreateTopLevelPlatformWidget()); 3515 WidgetAutoclosePtr widget2(CreateTopLevelPlatformWidget());
3511 widget2->client_view()->AddChildView(child); 3516 widget2->client_view()->AddChildView(child);
3512 EXPECT_TRUE(removals_observer.DidRemoveView(child)); 3517 EXPECT_TRUE(removals_observer.DidRemoveView(child));
3513 3518
3514 widget->RemoveRemovalsObserver(&removals_observer); 3519 widget->RemoveRemovalsObserver(&removals_observer);
3515 } 3520 }
3516 3521
3517 } // namespace test 3522 } // namespace test
3518 } // namespace views 3523 } // namespace views
OLDNEW
« 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