| 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 widget->IsMouseEventsEnabled(); | 647 widget->IsMouseEventsEnabled(); |
| 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 } | 658 } |
| 658 | 659 |
| 659 private: | 660 private: |
| 660 DISALLOW_COPY_AND_ASSIGN(WidgetWithDestroyedNativeViewTest); | 661 DISALLOW_COPY_AND_ASSIGN(WidgetWithDestroyedNativeViewTest); |
| 661 }; | 662 }; |
| 662 | 663 |
| 663 TEST_F(WidgetWithDestroyedNativeViewTest, Test) { | 664 TEST_F(WidgetWithDestroyedNativeViewTest, Test) { |
| 664 { | 665 { |
| 665 Widget widget; | 666 Widget widget; |
| 666 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP); | 667 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP); |
| (...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2591 EXPECT_EQ(3, view->GetEventCount(ui::ET_MOUSE_PRESSED)); | 2592 EXPECT_EQ(3, view->GetEventCount(ui::ET_MOUSE_PRESSED)); |
| 2592 EXPECT_EQ(3, view->GetEventCount(ui::ET_MOUSE_RELEASED)); | 2593 EXPECT_EQ(3, view->GetEventCount(ui::ET_MOUSE_RELEASED)); |
| 2593 EXPECT_EQ(1, view->GetEventCount(ui::ET_MOUSE_DRAGGED)); | 2594 EXPECT_EQ(1, view->GetEventCount(ui::ET_MOUSE_DRAGGED)); |
| 2594 EXPECT_EQ(ui::EF_LEFT_MOUSE_BUTTON, view->last_flags()); | 2595 EXPECT_EQ(ui::EF_LEFT_MOUSE_BUTTON, view->last_flags()); |
| 2595 | 2596 |
| 2596 widget->CloseNow(); | 2597 widget->CloseNow(); |
| 2597 } | 2598 } |
| 2598 | 2599 |
| 2599 } // namespace test | 2600 } // namespace test |
| 2600 } // namespace views | 2601 } // namespace views |
| OLD | NEW |