diff options
author | oshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 17:10:09 +0000 |
---|---|---|
committer | oshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 17:10:09 +0000 |
commit | 0b8a1756fd97f6df198482cf2e45f4ba814bcb51 (patch) | |
tree | ec809b7680600a8612a555431a73ff533a9e4173 /views/view_unittest.cc | |
parent | 879197377ddc7b595b2560e26466fbb5bb96f6dd (diff) | |
download | chromium_src-0b8a1756fd97f6df198482cf2e45f4ba814bcb51.zip chromium_src-0b8a1756fd97f6df198482cf2e45f4ba814bcb51.tar.gz chromium_src-0b8a1756fd97f6df198482cf2e45f4ba814bcb51.tar.bz2 |
Compile and test TextfieldViews on win as well.
Created common test base class for views.
Note: Textfield::RequestFocus is failing because Windows' FocusManager::ClearNativeFocus resets the focused view to NULL for some reason. I don't have win at hand and am now requesting win7. I will look into it once I've got win7.
BUG=none
TEST=native_textfield_views_unittest and textfield_views_model_unittest have been enabled for win.
Review URL: http://codereview.chromium.org/6102003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71183 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view_unittest.cc')
-rw-r--r-- | views/view_unittest.cc | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/views/view_unittest.cc b/views/view_unittest.cc index d29af08..0bd612f 100644 --- a/views/view_unittest.cc +++ b/views/view_unittest.cc @@ -5,12 +5,10 @@ #include <map> #include "app/keyboard_codes.h" -#include "base/message_loop.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "gfx/canvas_skia.h" #include "gfx/path.h" -#include "testing/gtest/include/gtest/gtest.h" #include "ui/base/clipboard/clipboard.h" #include "views/background.h" #include "views/controls/button/checkbox.h" @@ -20,6 +18,7 @@ #include "views/event.h" #include "views/focus/accelerator_handler.h" #include "views/focus/view_storage.h" +#include "views/test/views_test_base.h" #include "views/view.h" #include "views/views_delegate.h" #include "views/widget/root_view.h" @@ -42,24 +41,12 @@ using namespace views; namespace { -class ViewTest : public testing::Test { +class ViewTest : public ViewsTestBase { public: ViewTest() { -#if defined(OS_WIN) - OleInitialize(NULL); -#endif } - ~ViewTest() { -#if defined(OS_WIN) - OleUninitialize(); -#endif - } - - virtual void TearDown() { - // Flush the message loop because we have pending release tasks - // and these tasks if un-executed would upset Valgrind. - RunPendingMessages(); + virtual ~ViewTest() { } Widget* CreateWidget() { @@ -69,12 +56,6 @@ class ViewTest : public testing::Test { return new WidgetGtk(WidgetGtk::TYPE_WINDOW); #endif } - - void RunPendingMessages() { - message_loop_.RunAllPending(); - } - private: - MessageLoopForUI message_loop_; }; // Paints the RootView. |