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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
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 "chrome/browser/autocomplete/autocomplete.h" 5 #include "chrome/browser/autocomplete/autocomplete.h"
6 #include "chrome/browser/autocomplete/autocomplete_edit.h" 6 #include "chrome/browser/autocomplete/autocomplete_edit.h"
7 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" 7 #include "chrome/browser/autocomplete/autocomplete_edit_view.h"
8 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" 8 #include "chrome/browser/autocomplete/autocomplete_popup_model.h"
9 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
10 #include "chrome/browser/browser_window.h" 10 #include "chrome/browser/browser_window.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 AutocompleteController* GetAutocompleteController() const { 45 AutocompleteController* GetAutocompleteController() const {
46 return GetLocationBar()->location_entry()->model()->popup_model()-> 46 return GetLocationBar()->location_entry()->model()->popup_model()->
47 autocomplete_controller(); 47 autocomplete_controller();
48 } 48 }
49 49
50 void WaitForHistoryBackendToLoad() { 50 void WaitForHistoryBackendToLoad() {
51 HistoryService* history_service = 51 HistoryService* history_service =
52 browser()->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS); 52 browser()->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS);
53 if (!history_service->backend_loaded()) { 53 if (!history_service->BackendLoaded()) {
54 NotificationRegistrar registrar; 54 NotificationRegistrar registrar;
55 registrar.Add(this, NotificationType::HISTORY_LOADED, 55 registrar.Add(this, NotificationType::HISTORY_LOADED,
56 NotificationService::AllSources()); 56 NotificationService::AllSources());
57 ui_test_utils::RunMessageLoop(); 57 ui_test_utils::RunMessageLoop();
58 } 58 }
59 } 59 }
60 60
61 virtual void Observe(NotificationType type, 61 virtual void Observe(NotificationType type,
62 const NotificationSource& source, 62 const NotificationSource& source,
63 const NotificationDetails& details) { 63 const NotificationDetails& details) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 location_bar->Revert(); 132 location_bar->Revert();
133 133
134 EXPECT_EQ(std::wstring(), location_bar->GetInputString()); 134 EXPECT_EQ(std::wstring(), location_bar->GetInputString());
135 EXPECT_EQ(UTF8ToWide(chrome::kAboutBlankURL), 135 EXPECT_EQ(UTF8ToWide(chrome::kAboutBlankURL),
136 location_bar->location_entry()->GetText()); 136 location_bar->location_entry()->GetText());
137 EXPECT_FALSE(location_bar->location_entry()->IsSelectAll()); 137 EXPECT_FALSE(location_bar->location_entry()->IsSelectAll());
138 const AutocompleteResult& result = autocomplete_controller->result(); 138 const AutocompleteResult& result = autocomplete_controller->result();
139 EXPECT_TRUE(result.empty()) << AutocompleteResultAsString(result); 139 EXPECT_TRUE(result.empty()) << AutocompleteResultAsString(result);
140 } 140 }
141 } 141 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698