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

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

Issue 2120353003: Fix TouchSelectionControllerImpl tests failing with DPI=125% (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/aura/client/screen_position_client.h" 10 #include "ui/aura/client/screen_position_client.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void CreateTextfield() { 90 void CreateTextfield() {
91 textfield_ = new Textfield(); 91 textfield_ = new Textfield();
92 textfield_widget_ = new Widget; 92 textfield_widget_ = new Widget;
93 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP); 93 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP);
94 params.bounds = gfx::Rect(0, 0, 200, 200); 94 params.bounds = gfx::Rect(0, 0, 200, 200);
95 textfield_widget_->Init(params); 95 textfield_widget_->Init(params);
96 View* container = new View(); 96 View* container = new View();
97 textfield_widget_->SetContentsView(container); 97 textfield_widget_->SetContentsView(container);
98 container->AddChildView(textfield_); 98 container->AddChildView(textfield_);
99 99
100 textfield_->SetBoundsRect(gfx::Rect(0, 0, 200, 20)); 100 textfield_->SetBoundsRect(gfx::Rect(0, 0, 200, 21));
mohsen 2016/07/07 19:41:13 Is this one extra pixel going to be enough for all
101 textfield_->set_id(1); 101 textfield_->set_id(1);
102 textfield_widget_->Show(); 102 textfield_widget_->Show();
103 103
104 textfield_->RequestFocus(); 104 textfield_->RequestFocus();
105 textfield_test_api_.reset(new TextfieldTestApi(textfield_)); 105 textfield_test_api_.reset(new TextfieldTestApi(textfield_));
106 } 106 }
107 107
108 void CreateWidget() { 108 void CreateWidget() {
109 widget_ = new Widget; 109 widget_ = new Widget;
110 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP); 110 Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_POPUP);
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 // Start touch editing; then press a key and ensure it deactivates touch 868 // Start touch editing; then press a key and ensure it deactivates touch
869 // selection. 869 // selection.
870 StartTouchEditing(); 870 StartTouchEditing();
871 EXPECT_TRUE(GetSelectionController()); 871 EXPECT_TRUE(GetSelectionController());
872 generator.PressKey(ui::VKEY_A, 0); 872 generator.PressKey(ui::VKEY_A, 0);
873 RunPendingMessages(); 873 RunPendingMessages();
874 EXPECT_FALSE(GetSelectionController()); 874 EXPECT_FALSE(GetSelectionController());
875 } 875 }
876 876
877 } // namespace views 877 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698