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 "ash/drag_drop/drag_drop_controller.h" | 5 #include "ash/drag_drop/drag_drop_controller.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 DragDropController::DragCancel(); | 151 DragDropController::DragCancel(); |
152 drag_canceled_ = true; | 152 drag_canceled_ = true; |
153 } | 153 } |
154 | 154 |
155 DISALLOW_COPY_AND_ASSIGN(TestDragDropController); | 155 DISALLOW_COPY_AND_ASSIGN(TestDragDropController); |
156 }; | 156 }; |
157 | 157 |
158 class TestNativeWidgetAura : public views::NativeWidgetAura { | 158 class TestNativeWidgetAura : public views::NativeWidgetAura { |
159 public: | 159 public: |
160 explicit TestNativeWidgetAura(views::internal::NativeWidgetDelegate* delegate) | 160 explicit TestNativeWidgetAura(views::internal::NativeWidgetDelegate* delegate) |
161 : NativeWidgetAura(delegate), | 161 : NativeWidgetAura(delegate, NULL), |
162 check_if_capture_lost_(false) { | 162 check_if_capture_lost_(false) { |
163 } | 163 } |
164 | 164 |
165 void set_check_if_capture_lost(bool value) { | 165 void set_check_if_capture_lost(bool value) { |
166 check_if_capture_lost_ = value; | 166 check_if_capture_lost_ = value; |
167 } | 167 } |
168 | 168 |
169 virtual void OnCaptureLost() OVERRIDE { | 169 virtual void OnCaptureLost() OVERRIDE { |
170 DCHECK(!check_if_capture_lost_); | 170 DCHECK(!check_if_capture_lost_); |
171 views::NativeWidgetAura::OnCaptureLost(); | 171 views::NativeWidgetAura::OnCaptureLost(); |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 EXPECT_EQ(1, drag_view->num_drag_enters_); | 667 EXPECT_EQ(1, drag_view->num_drag_enters_); |
668 EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(), | 668 EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(), |
669 drag_view->num_drag_updates_); | 669 drag_view->num_drag_updates_); |
670 EXPECT_EQ(0, drag_view->num_drops_); | 670 EXPECT_EQ(0, drag_view->num_drops_); |
671 EXPECT_EQ(1, drag_view->num_drag_exits_); | 671 EXPECT_EQ(1, drag_view->num_drag_exits_); |
672 EXPECT_TRUE(drag_view->drag_done_received_); | 672 EXPECT_TRUE(drag_view->drag_done_received_); |
673 } | 673 } |
674 | 674 |
675 } // namespace test | 675 } // namespace test |
676 } // namespace aura | 676 } // namespace aura |
OLD | NEW |