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