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

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

Issue 943093002: Make bigger string size in RenderTextHarfBuzz. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "ui/aura/client/screen_position_client.h" 7 #include "ui/aura/client/screen_position_client.h"
8 #include "ui/aura/test/test_cursor_client.h" 8 #include "ui/aura/test/test_cursor_client.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void CreateTextfield() { 93 void CreateTextfield() {
94 textfield_ = new Textfield(); 94 textfield_ = new Textfield();
95 textfield_widget_ = new Widget; 95 textfield_widget_ = new Widget;
96 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP); 96 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP);
97 params.bounds = gfx::Rect(0, 0, 200, 200); 97 params.bounds = gfx::Rect(0, 0, 200, 200);
98 textfield_widget_->Init(params); 98 textfield_widget_->Init(params);
99 View* container = new View(); 99 View* container = new View();
100 textfield_widget_->SetContentsView(container); 100 textfield_widget_->SetContentsView(container);
101 container->AddChildView(textfield_); 101 container->AddChildView(textfield_);
102 102
103 textfield_->SetBoundsRect(gfx::Rect(0, 0, 200, 20)); 103 textfield_->SetBounds(0, 0, 200, textfield_->GetHeightForWidth(200));
104 textfield_->set_id(1); 104 textfield_->set_id(1);
105 textfield_widget_->Show(); 105 textfield_widget_->Show();
106 106
107 textfield_->RequestFocus(); 107 textfield_->RequestFocus();
108 textfield_test_api_.reset(new TextfieldTestApi(textfield_)); 108 textfield_test_api_.reset(new TextfieldTestApi(textfield_));
109 } 109 }
110 110
111 void CreateWidget() { 111 void CreateWidget() {
112 widget_ = new Widget; 112 widget_ = new Widget;
113 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP); 113 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP);
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 // Start touch editing; then press a key and ensure it deactivates touch 878 // Start touch editing; then press a key and ensure it deactivates touch
879 // selection. 879 // selection.
880 StartTouchEditing(); 880 StartTouchEditing();
881 EXPECT_TRUE(GetSelectionController()); 881 EXPECT_TRUE(GetSelectionController());
882 generator.PressKey(ui::VKEY_A, 0); 882 generator.PressKey(ui::VKEY_A, 0);
883 RunPendingMessages(); 883 RunPendingMessages();
884 EXPECT_FALSE(GetSelectionController()); 884 EXPECT_FALSE(GetSelectionController());
885 } 885 }
886 886
887 } // namespace views 887 } // namespace views
OLDNEW
« ui/gfx/render_text_unittest.cc ('K') | « ui/gfx/render_text_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698