Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: views/view_unittest.cc

Issue 6004010: Implement clipboard features in views textfield. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: code style fixes Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/test/test_views_delegate.h ('k') | views/views.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view_unittest.cc
diff --git a/views/view_unittest.cc b/views/view_unittest.cc
index f5d564d2c4422992a296a55d4dbf612b9afcccaf..d29af081f030a89937bf91f4f3d40b4810f808a1 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) {
« no previous file with comments | « views/test/test_views_delegate.h ('k') | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698