OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <stdio.h> | 5 #include <stdio.h> |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 registrar.Add(this, NotificationType::TEMPLATE_URL_MODEL_LOADED, | 217 registrar.Add(this, NotificationType::TEMPLATE_URL_MODEL_LOADED, |
218 Source<TemplateURLModel>(model)); | 218 Source<TemplateURLModel>(model)); |
219 model->Load(); | 219 model->Load(); |
220 ui_test_utils::RunMessageLoop(); | 220 ui_test_utils::RunMessageLoop(); |
221 } | 221 } |
222 | 222 |
223 ASSERT_TRUE(model->loaded()); | 223 ASSERT_TRUE(model->loaded()); |
224 | 224 |
225 TemplateURL* template_url = new TemplateURL(); | 225 TemplateURL* template_url = new TemplateURL(); |
226 template_url->SetURL(kSearchURL, 0, 0); | 226 template_url->SetURL(kSearchURL, 0, 0); |
227 template_url->set_keyword(UTF8ToUTF16(kSearchKeyword)); | 227 template_url->set_keyword(UTF8ToWide(kSearchKeyword)); |
228 template_url->set_short_name(UTF8ToUTF16(kSearchShortName)); | 228 template_url->set_short_name(UTF8ToWide(kSearchShortName)); |
229 | 229 |
230 model->Add(template_url); | 230 model->Add(template_url); |
231 model->SetDefaultSearchProvider(template_url); | 231 model->SetDefaultSearchProvider(template_url); |
232 } | 232 } |
233 | 233 |
234 void SetupHistory() { | 234 void SetupHistory() { |
235 Profile* profile = browser()->profile(); | 235 Profile* profile = browser()->profile(); |
236 HistoryService* history_service = | 236 HistoryService* history_service = |
237 profile->GetHistoryService(Profile::EXPLICIT_ACCESS); | 237 profile->GetHistoryService(Profile::EXPLICIT_ACCESS); |
238 ASSERT_TRUE(history_service); | 238 ASSERT_TRUE(history_service); |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 | 843 |
844 // Paste text. | 844 // Paste text. |
845 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_V, true, false, false)); | 845 ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_V, true, false, false)); |
846 ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone()); | 846 ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone()); |
847 ASSERT_TRUE(popup_model->IsOpen()); | 847 ASSERT_TRUE(popup_model->IsOpen()); |
848 | 848 |
849 // Inline autocomplete shouldn't be triggered. | 849 // Inline autocomplete shouldn't be triggered. |
850 ASSERT_EQ(L"abc", edit_view->GetText()); | 850 ASSERT_EQ(L"abc", edit_view->GetText()); |
851 } | 851 } |
852 #endif | 852 #endif |
OLD | NEW |