diff options
author | varunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 02:33:38 +0000 |
---|---|---|
committer | varunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 02:33:38 +0000 |
commit | 2689f76aca1f632b92fdd1d7be1b4bf06671aa36 (patch) | |
tree | 6e701af6c68d8996f0bce911f4e48d6d4c4e31ee /views/view_unittest.cc | |
parent | 8f5e1aa2f31c69609e12f7030da4ff9da1ec1a23 (diff) | |
download | chromium_src-2689f76aca1f632b92fdd1d7be1b4bf06671aa36.zip chromium_src-2689f76aca1f632b92fdd1d7be1b4bf06671aa36.tar.gz chromium_src-2689f76aca1f632b92fdd1d7be1b4bf06671aa36.tar.bz2 |
Implement clipboard features in views textfield.
BUG=none
TEST=Added new test.
Review URL: http://codereview.chromium.org/6004010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view_unittest.cc')
-rw-r--r-- | views/view_unittest.cc | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/views/view_unittest.cc b/views/view_unittest.cc index f5d564d..d29af08 100644 --- a/views/view_unittest.cc +++ b/views/view_unittest.cc @@ -29,6 +29,7 @@ #if defined(OS_WIN) #include "views/widget/widget_win.h" #include "views/controls/button/native_button_win.h" +#include "views/test/test_views_delegate.h" #elif defined(OS_LINUX) #include "views/widget/widget_gtk.h" #include "views/window/window_gtk.h" @@ -840,44 +841,6 @@ TEST_F(ViewTest, Textfield) { } #if defined(OS_WIN) -class TestViewsDelegate : public views::ViewsDelegate { - public: - TestViewsDelegate() {} - virtual ~TestViewsDelegate() {} - - // Overridden from views::ViewsDelegate: - virtual ui::Clipboard* GetClipboard() const { - if (!clipboard_.get()) { - // Note that we need a MessageLoop for the next call to work. - clipboard_.reset(new ui::Clipboard); - } - return clipboard_.get(); - } - virtual void SaveWindowPlacement(const std::wstring& window_name, - const gfx::Rect& bounds, - bool maximized) { - } - virtual bool GetSavedWindowBounds(const std::wstring& window_name, - gfx::Rect* bounds) const { - return false; - } - virtual bool GetSavedMaximizedState(const std::wstring& window_name, - bool* maximized) const { - return false; - } - virtual void NotifyAccessibilityEvent( - views::View* view, AccessibilityTypes::Event event_type) {} - virtual HICON GetDefaultWindowIcon() const { - return NULL; - } - virtual void AddRef() {} - virtual void ReleaseRef() {} - - private: - mutable scoped_ptr<ui::Clipboard> clipboard_; - - DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate); -}; // Tests that the Textfield view respond appropiately to cut/copy/paste. TEST_F(ViewTest, TextfieldCutCopyPaste) { |