diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/aura/test/aura_test_helper.h | 8 | ||||
-rw-r--r-- | ui/base/dragdrop/drop_target.cc | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/ui/aura/test/aura_test_helper.h b/ui/aura/test/aura_test_helper.h index 94716cd..1a14e58 100644 --- a/ui/aura/test/aura_test_helper.h +++ b/ui/aura/test/aura_test_helper.h @@ -8,6 +8,10 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#if defined(OS_WIN) +#include "ui/base/win/scoped_ole_initializer.h" +#endif + class MessageLoopForUI; namespace ui { @@ -56,6 +60,10 @@ class AuraTestHelper { scoped_ptr<ui::InputMethod> test_input_method_; scoped_ptr<FocusManager> focus_manager_; +#if defined(OS_WIN) + ui::ScopedOleInitializer ole_initializer_; +#endif + DISALLOW_COPY_AND_ASSIGN(AuraTestHelper); }; diff --git a/ui/base/dragdrop/drop_target.cc b/ui/base/dragdrop/drop_target.cc index 84b2745..0783ddd 100644 --- a/ui/base/dragdrop/drop_target.cc +++ b/ui/base/dragdrop/drop_target.cc @@ -16,14 +16,8 @@ DropTarget::DropTarget(HWND hwnd) : hwnd_(hwnd), ref_count_(0) { DCHECK(hwnd); - // The main browser process registers OLE, as do various test runners; if you - // fail the next call, you're presumably reaching here from test code that - // doesn't trigger any of those spots. Adding an appropriate - // ScopedOleInitializer will fix this, but beware you don't add it somewhere - // that causes nested initializations for some other test, which will add log - // warnings. HRESULT result = RegisterDragDrop(hwnd, this); - DCHECK(SUCCEEDED(result)) << "OLE is not initialized"; + DCHECK(SUCCEEDED(result)); } DropTarget::~DropTarget() { |