| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/histogram_base.h" | 8 #include "base/metrics/histogram_base.h" |
| 9 #include "base/metrics/histogram_samples.h" | 9 #include "base/metrics/histogram_samples.h" |
| 10 #include "base/metrics/statistics_recorder.h" | 10 #include "base/metrics/statistics_recorder.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 search, template_url->id(), term); | 219 search, template_url->id(), term); |
| 220 return true; | 220 return true; |
| 221 } | 221 } |
| 222 | 222 |
| 223 void BlockUntilHistoryProcessesPendingRequests() { | 223 void BlockUntilHistoryProcessesPendingRequests() { |
| 224 HistoryService* history = HistoryServiceFactory::GetForProfile( | 224 HistoryService* history = HistoryServiceFactory::GetForProfile( |
| 225 browser()->profile(), Profile::EXPLICIT_ACCESS); | 225 browser()->profile(), Profile::EXPLICIT_ACCESS); |
| 226 DCHECK(history); | 226 DCHECK(history); |
| 227 DCHECK(base::MessageLoop::current()); | 227 DCHECK(base::MessageLoop::current()); |
| 228 | 228 |
| 229 CancelableRequestConsumer consumer; | 229 base::CancelableTaskTracker tracker; |
| 230 history->ScheduleDBTask(new QuittingHistoryDBTask(), &consumer); | 230 history->ScheduleDBTask(new QuittingHistoryDBTask(), &tracker); |
| 231 base::MessageLoop::current()->Run(); | 231 base::MessageLoop::current()->Run(); |
| 232 } | 232 } |
| 233 | 233 |
| 234 int CountSearchProviderSuggestions() { | 234 int CountSearchProviderSuggestions() { |
| 235 return omnibox()->model()->autocomplete_controller()->search_provider()-> | 235 return omnibox()->model()->autocomplete_controller()->search_provider()-> |
| 236 matches().size(); | 236 matches().size(); |
| 237 } | 237 } |
| 238 | 238 |
| 239 int on_most_visited_change_calls_; | 239 int on_most_visited_change_calls_; |
| 240 int most_visited_items_count_; | 240 int most_visited_items_count_; |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 stream << "link.href = \"" << result_url.spec() << "\";"; | 974 stream << "link.href = \"" << result_url.spec() << "\";"; |
| 975 stream << "document.body.appendChild(link);"; | 975 stream << "document.body.appendChild(link);"; |
| 976 stream << "link.click();"; | 976 stream << "link.click();"; |
| 977 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); | 977 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); |
| 978 | 978 |
| 979 content::WaitForLoadStop(contents); | 979 content::WaitForLoadStop(contents); |
| 980 std::string expected_title = | 980 std::string expected_title = |
| 981 "Referrer is " + instant_url().GetWithEmptyPath().spec(); | 981 "Referrer is " + instant_url().GetWithEmptyPath().spec(); |
| 982 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); | 982 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); |
| 983 } | 983 } |
| OLD | NEW |