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

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

Issue 1995613003: views/mus: Fix some flaky crashes during test teardown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@views-mus-more-focus-fix
Patch Set: . Created 4 years, 7 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 | « ui/views/test/views_test_base.cc ('k') | 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 <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 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1945 generator.ClickLeftButton(); 1945 generator.ClickLeftButton();
1946 EXPECT_FALSE(deletion_observer.IsWidgetAlive()); 1946 EXPECT_FALSE(deletion_observer.IsWidgetAlive());
1947 1947
1948 // Yay we did not crash! 1948 // Yay we did not crash!
1949 } 1949 }
1950 1950
1951 // No touch on desktop Mac. Tracked in http://crbug.com/445520. 1951 // No touch on desktop Mac. Tracked in http://crbug.com/445520.
1952 #if !defined(OS_MACOSX) || defined(USE_AURA) 1952 #if !defined(OS_MACOSX) || defined(USE_AURA)
1953 1953
1954 TEST_F(WidgetTest, WidgetDeleted_InDispatchGestureEvent) { 1954 TEST_F(WidgetTest, WidgetDeleted_InDispatchGestureEvent) {
1955 // This test doesn't make sense for mus. Force NativeWidgetAura to be used. 1955 // This test doesn't make sense for mus.
1956 DisableNativeWidgetMus(); 1956 if (IsMus())
1957 return;
1957 1958
1958 Widget* widget = new Widget; 1959 Widget* widget = new Widget;
1959 Widget::InitParams params = 1960 Widget::InitParams params =
1960 CreateParams(views::Widget::InitParams::TYPE_POPUP); 1961 CreateParams(views::Widget::InitParams::TYPE_POPUP);
1961 widget->Init(params); 1962 widget->Init(params);
1962 1963
1963 widget->SetContentsView(new CloseWidgetView(ui::ET_GESTURE_TAP_DOWN)); 1964 widget->SetContentsView(new CloseWidgetView(ui::ET_GESTURE_TAP_DOWN));
1964 1965
1965 widget->SetSize(gfx::Size(100, 100)); 1966 widget->SetSize(gfx::Size(100, 100));
1966 widget->Show(); 1967 widget->Show();
(...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after
3710 EXPECT_FALSE(!!IsWindow(owned_hwnd)); 3711 EXPECT_FALSE(!!IsWindow(owned_hwnd));
3711 EXPECT_TRUE(!!IsWindowEnabled(top_hwnd)); 3712 EXPECT_TRUE(!!IsWindowEnabled(top_hwnd));
3712 3713
3713 top_level_widget.CloseNow(); 3714 top_level_widget.CloseNow();
3714 } 3715 }
3715 3716
3716 #endif // defined(OS_WIN) 3717 #endif // defined(OS_WIN)
3717 3718
3718 } // namespace test 3719 } // namespace test
3719 } // namespace views 3720 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/views_test_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698