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

Side by Side Diff: ui/app_list/views/search_result_list_view_unittest.cc

Issue 404203003: Distinguish between keystroke and character events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsCharFromNative() for Mac build Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/app_list/views/search_result_list_view.h" 5 #include "ui/app_list/views/search_result_list_view.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/app_list/app_list_model.h" 10 #include "ui/app_list/app_list_model.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 void AddTestResultAtIndex(int index) { 77 void AddTestResultAtIndex(int index) {
78 view_delegate_.GetModel()->results()->Add(new SearchResult()); 78 view_delegate_.GetModel()->results()->Add(new SearchResult());
79 } 79 }
80 80
81 void DeleteResultAt(int index) { 81 void DeleteResultAt(int index) {
82 view_delegate_.GetModel()->results()->DeleteAt(index); 82 view_delegate_.GetModel()->results()->DeleteAt(index);
83 } 83 }
84 84
85 bool KeyPress(ui::KeyboardCode key_code) { 85 bool KeyPress(ui::KeyboardCode key_code) {
86 ui::KeyEvent event(ui::ET_KEY_PRESSED, key_code, ui::EF_NONE, true); 86 ui::KeyEvent event(ui::ET_KEY_PRESSED, key_code, ui::EF_NONE);
87 return view_->OnKeyPressed(event); 87 return view_->OnKeyPressed(event);
88 } 88 }
89 89
90 bool IsAutoLaunching() { 90 bool IsAutoLaunching() {
91 return view_->auto_launch_animation_; 91 return view_->auto_launch_animation_;
92 } 92 }
93 93
94 void ForceAutoLaunch() { 94 void ForceAutoLaunch() {
95 view_->ForceAutoLaunchForTest(); 95 view_->ForceAutoLaunchForTest();
96 } 96 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 AddTestResultAtIndex(kDefaultSearchItems); 204 AddTestResultAtIndex(kDefaultSearchItems);
205 ExpectConsistent(); 205 ExpectConsistent();
206 206
207 // Delete from start. 207 // Delete from start.
208 DeleteResultAt(0); 208 DeleteResultAt(0);
209 ExpectConsistent(); 209 ExpectConsistent();
210 } 210 }
211 211
212 } // namespace test 212 } // namespace test
213 } // namespace app_list 213 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/search_box_view_unittest.cc ('k') | ui/app_list/views/test/apps_grid_view_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698