OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/test/base/view_event_test_base.h" | 5 #include "chrome/test/base/view_event_test_base.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <ole2.h> | 8 #include <ole2.h> |
9 #endif | 9 #endif |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "base/string_number_conversions.h" | 15 #include "base/string_number_conversions.h" |
16 #include "chrome/browser/automation/ui_controls.h" | 16 #include "chrome/browser/automation/ui_controls.h" |
17 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
| 18 #include "ui/views/widget/widget.h" |
18 #include "views/view.h" | 19 #include "views/view.h" |
19 #include "views/widget/widget.h" | |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // View subclass that allows you to specify the preferred size. | 23 // View subclass that allows you to specify the preferred size. |
24 class TestView : public views::View { | 24 class TestView : public views::View { |
25 public: | 25 public: |
26 TestView() {} | 26 TestView() {} |
27 | 27 |
28 void SetPreferredSize(const gfx::Size& size) { | 28 void SetPreferredSize(const gfx::Size& size) { |
29 preferred_size_ = size; | 29 preferred_size_ = size; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 dnd_thread_.reset(NULL); | 164 dnd_thread_.reset(NULL); |
165 } | 165 } |
166 | 166 |
167 void ViewEventTestBase::RunTestMethod(const base::Closure& task) { | 167 void ViewEventTestBase::RunTestMethod(const base::Closure& task) { |
168 StopBackgroundThread(); | 168 StopBackgroundThread(); |
169 | 169 |
170 task.Run(); | 170 task.Run(); |
171 if (HasFatalFailure()) | 171 if (HasFatalFailure()) |
172 Done(); | 172 Done(); |
173 } | 173 } |
OLD | NEW |