| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |