diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-14 16:32:34 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-14 16:32:34 +0000 |
commit | bec08d7ad993f82975e0cec80bb9d7e711c38cdd (patch) | |
tree | 46b513655d993d71fcc434861e16f0af28c39d83 /ui/views/test | |
parent | d8e73bdf182614e9893e898e6358c262ea50a749 (diff) | |
download | chromium_src-bec08d7ad993f82975e0cec80bb9d7e711c38cdd.zip chromium_src-bec08d7ad993f82975e0cec80bb9d7e711c38cdd.tar.gz chromium_src-bec08d7ad993f82975e0cec80bb9d7e711c38cdd.tar.bz2 |
Move scoped_ole_initializer.h to ui/base/win and clean up ole initialization/uninitialization.
R=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9664069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126658 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/test')
-rw-r--r-- | ui/views/test/views_test_base.cc | 10 | ||||
-rw-r--r-- | ui/views/test/views_test_base.h | 8 |
2 files changed, 8 insertions, 10 deletions
diff --git a/ui/views/test/views_test_base.cc b/ui/views/test/views_test_base.cc index 7b87f2e..84e9baf 100644 --- a/ui/views/test/views_test_base.cc +++ b/ui/views/test/views_test_base.cc @@ -4,10 +4,6 @@ #include "ui/views/test/views_test_base.h" -#if defined(OS_WIN) -#include <ole2.h> -#endif - #if defined(USE_AURA) #include "base/compiler_specific.h" #include "ui/aura/client/aura_constants.h" @@ -64,18 +60,12 @@ namespace views { ViewsTestBase::ViewsTestBase() : setup_called_(false), teardown_called_(false) { -#if defined(OS_WIN) - OleInitialize(NULL); -#endif #if defined(USE_AURA) test_input_method_.reset(new DummyInputMethod); #endif } ViewsTestBase::~ViewsTestBase() { -#if defined(OS_WIN) - OleUninitialize(); -#endif CHECK(setup_called_) << "You have overridden SetUp but never called super class's SetUp"; CHECK(teardown_called_) diff --git a/ui/views/test/views_test_base.h b/ui/views/test/views_test_base.h index 635c24c..71f6bbd 100644 --- a/ui/views/test/views_test_base.h +++ b/ui/views/test/views_test_base.h @@ -11,6 +11,10 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/views/test/test_views_delegate.h" +#if defined(OS_WIN) +#include "ui/base/win/scoped_ole_initializer.h" +#endif + namespace aura { class RootWindow; namespace test { @@ -61,6 +65,10 @@ class ViewsTestBase : public testing::Test { bool setup_called_; bool teardown_called_; +#if defined(OS_WIN) + ui::ScopedOleInitializer ole_initializer_; +#endif + DISALLOW_COPY_AND_ASSIGN(ViewsTestBase); }; |