| 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 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3616 // Moving the child to a different widget should call the removals observer. | 3617 // Moving the child to a different widget should call the removals observer. |
| 3617 WidgetAutoclosePtr widget2(CreateTopLevelPlatformWidget()); | 3618 WidgetAutoclosePtr widget2(CreateTopLevelPlatformWidget()); |
| 3618 widget2->client_view()->AddChildView(child); | 3619 widget2->client_view()->AddChildView(child); |
| 3619 EXPECT_TRUE(removals_observer.DidRemoveView(child)); | 3620 EXPECT_TRUE(removals_observer.DidRemoveView(child)); |
| 3620 | 3621 |
| 3621 widget->RemoveRemovalsObserver(&removals_observer); | 3622 widget->RemoveRemovalsObserver(&removals_observer); |
| 3622 } | 3623 } |
| 3623 | 3624 |
| 3624 } // namespace test | 3625 } // namespace test |
| 3625 } // namespace views | 3626 } // namespace views |
| OLD | NEW |