| OLD | NEW |
| 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 <memory> | 6 #include <memory> |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1383 widget.InitForTest(CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS)); | 1383 widget.InitForTest(CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS)); |
| 1384 RunPendingMessages(); | 1384 RunPendingMessages(); |
| 1385 EXPECT_TRUE(widget.ReadReceivedPaintAndReset()); | 1385 EXPECT_TRUE(widget.ReadReceivedPaintAndReset()); |
| 1386 widget.SchedulePaintInRect(widget.GetRestoredBounds()); | 1386 widget.SchedulePaintInRect(widget.GetRestoredBounds()); |
| 1387 widget.Close(); | 1387 widget.Close(); |
| 1388 RunPendingMessages(); | 1388 RunPendingMessages(); |
| 1389 EXPECT_FALSE(widget.ReadReceivedPaintAndReset()); | 1389 EXPECT_FALSE(widget.ReadReceivedPaintAndReset()); |
| 1390 EXPECT_FALSE(widget.received_paint_while_hidden()); | 1390 EXPECT_FALSE(widget.received_paint_while_hidden()); |
| 1391 } | 1391 } |
| 1392 | 1392 |
| 1393 #if defined(OS_LINUX) | 1393 // Flaky; see https://crbug.com/596039. |
| 1394 #if defined(OS_LINUX) || defined(OS_WIN) |
| 1394 #define MAYBE_DesktopNativeWidgetNoPaintAfterHideTest DISABLED_DesktopNativeWidg
etNoPaintAfterHideTest | 1395 #define MAYBE_DesktopNativeWidgetNoPaintAfterHideTest DISABLED_DesktopNativeWidg
etNoPaintAfterHideTest |
| 1395 #else | 1396 #else |
| 1396 #define MAYBE_DesktopNativeWidgetNoPaintAfterHideTest DesktopNativeWidgetNoPaint
AfterHideTest | 1397 #define MAYBE_DesktopNativeWidgetNoPaintAfterHideTest DesktopNativeWidgetNoPaint
AfterHideTest |
| 1397 #endif | 1398 #endif |
| 1398 TEST_F(WidgetTest, MAYBE_DesktopNativeWidgetNoPaintAfterHideTest) { | 1399 TEST_F(WidgetTest, MAYBE_DesktopNativeWidgetNoPaintAfterHideTest) { |
| 1399 DesktopAuraTestValidPaintWidget widget; | 1400 DesktopAuraTestValidPaintWidget widget; |
| 1400 widget.InitForTest(CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS)); | 1401 widget.InitForTest(CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS)); |
| 1401 RunPendingMessages(); | 1402 RunPendingMessages(); |
| 1402 EXPECT_TRUE(widget.ReadReceivedPaintAndReset()); | 1403 EXPECT_TRUE(widget.ReadReceivedPaintAndReset()); |
| 1403 widget.SchedulePaintInRect(widget.GetRestoredBounds()); | 1404 widget.SchedulePaintInRect(widget.GetRestoredBounds()); |
| (...skipping 2307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3711 EXPECT_FALSE(!!IsWindow(owned_hwnd)); | 3712 EXPECT_FALSE(!!IsWindow(owned_hwnd)); |
| 3712 EXPECT_TRUE(!!IsWindowEnabled(top_hwnd)); | 3713 EXPECT_TRUE(!!IsWindowEnabled(top_hwnd)); |
| 3713 | 3714 |
| 3714 top_level_widget.CloseNow(); | 3715 top_level_widget.CloseNow(); |
| 3715 } | 3716 } |
| 3716 | 3717 |
| 3717 #endif // defined(OS_WIN) | 3718 #endif // defined(OS_WIN) |
| 3718 | 3719 |
| 3719 } // namespace test | 3720 } // namespace test |
| 3720 } // namespace views | 3721 } // namespace views |
| OLD | NEW |