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

Side by Side Diff: trunk/src/chrome/browser/ui/search/instant_extended_interactive_uitest.cc

Issue 416543006: Revert 284958 "Make HistoryDBTask not refcounted, and ensure it'..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 base::CancelableTaskTracker tracker; 229 base::CancelableTaskTracker tracker;
230 history->ScheduleDBTask( 230 history->ScheduleDBTask(new QuittingHistoryDBTask(), &tracker);
231 scoped_ptr<history::HistoryDBTask>(
232 new QuittingHistoryDBTask()),
233 &tracker);
234 base::MessageLoop::current()->Run(); 231 base::MessageLoop::current()->Run();
235 } 232 }
236 233
237 int CountSearchProviderSuggestions() { 234 int CountSearchProviderSuggestions() {
238 return omnibox()->model()->autocomplete_controller()->search_provider()-> 235 return omnibox()->model()->autocomplete_controller()->search_provider()->
239 matches().size(); 236 matches().size();
240 } 237 }
241 238
242 int on_most_visited_change_calls_; 239 int on_most_visited_change_calls_;
243 int most_visited_items_count_; 240 int most_visited_items_count_;
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 stream << "link.href = \"" << result_url.spec() << "\";"; 974 stream << "link.href = \"" << result_url.spec() << "\";";
978 stream << "document.body.appendChild(link);"; 975 stream << "document.body.appendChild(link);";
979 stream << "link.click();"; 976 stream << "link.click();";
980 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); 977 EXPECT_TRUE(content::ExecuteScript(contents, stream.str()));
981 978
982 content::WaitForLoadStop(contents); 979 content::WaitForLoadStop(contents);
983 std::string expected_title = 980 std::string expected_title =
984 "Referrer is " + instant_url().GetWithEmptyPath().spec(); 981 "Referrer is " + instant_url().GetWithEmptyPath().spec();
985 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); 982 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle());
986 } 983 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698