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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc

Issue 6291003: Revert 71485 - Remove wstring from TemplateURL and friends.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit.cc ('k') | chrome/browser/autocomplete/autocomplete_popup_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698