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

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

Issue 267019: Add the ability to unload the HistoryBackend.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/file_path.h" 7 #include "base/file_path.h"
8 #include "base/keyboard_codes.h" 8 #include "base/keyboard_codes.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 model->Add(template_url); 197 model->Add(template_url);
198 model->SetDefaultSearchProvider(template_url); 198 model->SetDefaultSearchProvider(template_url);
199 } 199 }
200 200
201 void SetupHistory() { 201 void SetupHistory() {
202 Profile* profile = browser()->profile(); 202 Profile* profile = browser()->profile();
203 HistoryService* history_service = 203 HistoryService* history_service =
204 profile->GetHistoryService(Profile::EXPLICIT_ACCESS); 204 profile->GetHistoryService(Profile::EXPLICIT_ACCESS);
205 ASSERT_TRUE(history_service); 205 ASSERT_TRUE(history_service);
206 206
207 if (!history_service->backend_loaded()) { 207 if (!history_service->BackendLoaded()) {
208 NotificationRegistrar registrar; 208 NotificationRegistrar registrar;
209 registrar.Add(this, NotificationType::HISTORY_LOADED, 209 registrar.Add(this, NotificationType::HISTORY_LOADED,
210 Source<Profile>(profile)); 210 Source<Profile>(profile));
211 ui_test_utils::RunMessageLoop(); 211 ui_test_utils::RunMessageLoop();
212 } 212 }
213 213
214 BookmarkModel* bookmark_model = profile->GetBookmarkModel(); 214 BookmarkModel* bookmark_model = profile->GetBookmarkModel();
215 ASSERT_TRUE(bookmark_model); 215 ASSERT_TRUE(bookmark_model);
216 216
217 if (!bookmark_model->IsLoaded()) { 217 if (!bookmark_model->IsLoaded()) {
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 break; 540 break;
541 } 541 }
542 542
543 EXPECT_NE(old_text, edit_view->GetText()); 543 EXPECT_NE(old_text, edit_view->GetText());
544 544
545 // Escape shall revert back to the default match item. 545 // Escape shall revert back to the default match item.
546 ASSERT_NO_FATAL_FAILURE(SendKey(base::VKEY_ESCAPE, false, false, false)); 546 ASSERT_NO_FATAL_FAILURE(SendKey(base::VKEY_ESCAPE, false, false, false));
547 EXPECT_EQ(old_text, edit_view->GetText()); 547 EXPECT_EQ(old_text, edit_view->GetText());
548 EXPECT_EQ(old_selected_line, popup_model->selected_line()); 548 EXPECT_EQ(old_selected_line, popup_model->selected_line());
549 } 549 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_browsertest.cc ('k') | chrome/browser/autocomplete/history_url_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698