| 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 <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 widget->SetNativeWindowProperty("xx", widget); | 648 widget->SetNativeWindowProperty("xx", widget); |
| 649 widget->GetNativeWindowProperty("xx"); | 649 widget->GetNativeWindowProperty("xx"); |
| 650 widget->GetFocusTraversable(); | 650 widget->GetFocusTraversable(); |
| 651 widget->GetLayer(); | 651 widget->GetLayer(); |
| 652 widget->ReorderNativeViews(); | 652 widget->ReorderNativeViews(); |
| 653 widget->SetCapture(widget->GetRootView()); | 653 widget->SetCapture(widget->GetRootView()); |
| 654 widget->ReleaseCapture(); | 654 widget->ReleaseCapture(); |
| 655 widget->HasCapture(); | 655 widget->HasCapture(); |
| 656 widget->GetWorkAreaBoundsInScreen(); | 656 widget->GetWorkAreaBoundsInScreen(); |
| 657 widget->IsTranslucentWindowOpacitySupported(); | 657 widget->IsTranslucentWindowOpacitySupported(); |
| 658 widget->SetInterceptAllKeys(true); |
| 658 } | 659 } |
| 659 | 660 |
| 660 private: | 661 private: |
| 661 DISALLOW_COPY_AND_ASSIGN(WidgetWithDestroyedNativeViewTest); | 662 DISALLOW_COPY_AND_ASSIGN(WidgetWithDestroyedNativeViewTest); |
| 662 }; | 663 }; |
| 663 | 664 |
| 664 TEST_F(WidgetWithDestroyedNativeViewTest, Test) { | 665 TEST_F(WidgetWithDestroyedNativeViewTest, Test) { |
| 665 { | 666 { |
| 666 Widget widget; | 667 Widget widget; |
| 667 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP); | 668 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP); |
| (...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2728 EXPECT_EQ(3, view->GetEventCount(ui::ET_MOUSE_PRESSED)); | 2729 EXPECT_EQ(3, view->GetEventCount(ui::ET_MOUSE_PRESSED)); |
| 2729 EXPECT_EQ(3, view->GetEventCount(ui::ET_MOUSE_RELEASED)); | 2730 EXPECT_EQ(3, view->GetEventCount(ui::ET_MOUSE_RELEASED)); |
| 2730 EXPECT_EQ(1, view->GetEventCount(ui::ET_MOUSE_DRAGGED)); | 2731 EXPECT_EQ(1, view->GetEventCount(ui::ET_MOUSE_DRAGGED)); |
| 2731 EXPECT_EQ(ui::EF_LEFT_MOUSE_BUTTON, view->last_flags()); | 2732 EXPECT_EQ(ui::EF_LEFT_MOUSE_BUTTON, view->last_flags()); |
| 2732 | 2733 |
| 2733 widget->CloseNow(); | 2734 widget->CloseNow(); |
| 2734 } | 2735 } |
| 2735 | 2736 |
| 2736 } // namespace test | 2737 } // namespace test |
| 2737 } // namespace views | 2738 } // namespace views |
| OLD | NEW |