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

Side by Side Diff: ui/views/touchui/touch_selection_controller_impl_unittest.cc

Issue 8598031: views: Move widget/ directory to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland for real Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "ui/gfx/point.h" 6 #include "ui/gfx/point.h"
7 #include "ui/gfx/rect.h" 7 #include "ui/gfx/rect.h"
8 #include "ui/gfx/render_text.h" 8 #include "ui/gfx/render_text.h"
9 #include "ui/views/test/views_test_base.h" 9 #include "ui/views/test/views_test_base.h"
10 #include "ui/views/touchui/touch_selection_controller.h" 10 #include "ui/views/touchui/touch_selection_controller.h"
11 #include "ui/views/touchui/touch_selection_controller_impl.h" 11 #include "ui/views/touchui/touch_selection_controller_impl.h"
12 #include "ui/views/widget/widget.h"
12 #include "views/controls/textfield/native_textfield_views.h" 13 #include "views/controls/textfield/native_textfield_views.h"
13 #include "views/controls/textfield/textfield.h" 14 #include "views/controls/textfield/textfield.h"
14 #include "views/widget/widget.h"
15 15
16 namespace views { 16 namespace views {
17 17
18 class TouchSelectionControllerImplTest : public ViewsTestBase { 18 class TouchSelectionControllerImplTest : public ViewsTestBase {
19 public: 19 public:
20 TouchSelectionControllerImplTest() 20 TouchSelectionControllerImplTest()
21 : widget_(NULL), 21 : widget_(NULL),
22 textfield_(NULL), 22 textfield_(NULL),
23 textfield_view_(NULL) { 23 textfield_view_(NULL) {
24 } 24 }
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 VerifySelectionHandlePositions(true); 332 VerifySelectionHandlePositions(true);
333 333
334 // Drag selection handle 2 to right by 1 char. 334 // Drag selection handle 2 to right by 1 char.
335 x = textfield_->font().GetStringWidth(WideToUTF16(L"\x05e2")); 335 x = textfield_->font().GetStringWidth(WideToUTF16(L"\x05e2"));
336 SimulateSelectionHandleDrag(gfx::Point(x, 0), 2); 336 SimulateSelectionHandleDrag(gfx::Point(x, 0), 2);
337 EXPECT_EQ(WideToUTF16(L"c\x05e1"), textfield_->GetSelectedText()); 337 EXPECT_EQ(WideToUTF16(L"c\x05e1"), textfield_->GetSelectedText());
338 VerifySelectionHandlePositions(false); 338 VerifySelectionHandlePositions(false);
339 } 339 }
340 340
341 } // namespace views 341 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/touchui/touch_selection_controller_impl.cc ('k') | ui/views/widget/aero_tooltip_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698