| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "chrome/browser/autocomplete/autocomplete_match.h" | 9 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_result.h" | 10 #include "chrome/browser/autocomplete/autocomplete_result.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 ASSERT_EQ(2u, history_urls.size()); | 171 ASSERT_EQ(2u, history_urls.size()); |
| 172 ASSERT_EQ(GURL(search_string), history_urls[0]); | 172 ASSERT_EQ(GURL(search_string), history_urls[0]); |
| 173 ASSERT_EQ(url, history_urls[1]); | 173 ASSERT_EQ(url, history_urls[1]); |
| 174 | 174 |
| 175 TemplateURLService* service = TemplateURLServiceFactory::GetForProfile( | 175 TemplateURLService* service = TemplateURLServiceFactory::GetForProfile( |
| 176 browser()->profile()); | 176 browser()->profile()); |
| 177 ui_test_utils::WaitForTemplateURLServiceToLoad(service); | 177 ui_test_utils::WaitForTemplateURLServiceToLoad(service); |
| 178 LocationBar* location_bar = browser()->window()->GetLocationBar(); | 178 LocationBar* location_bar = browser()->window()->GetLocationBar(); |
| 179 ui_test_utils::SendToOmniboxAndSubmit(location_bar, search_string); | 179 ui_test_utils::SendToOmniboxAndSubmit(location_bar, search_string); |
| 180 OmniboxEditModel* model = location_bar->GetLocationEntry()->model(); | 180 OmniboxEditModel* model = location_bar->GetLocationEntry()->model(); |
| 181 EXPECT_EQ(GURL(search_string), model->CurrentMatch().destination_url); | 181 EXPECT_EQ(GURL(search_string), model->CurrentMatch(NULL).destination_url); |
| 182 EXPECT_EQ(ASCIIToUTF16(search_string), model->CurrentMatch().contents); | 182 EXPECT_EQ(ASCIIToUTF16(search_string), model->CurrentMatch(NULL).contents); |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace | 185 } // namespace |
| OLD | NEW |