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

Side by Side Diff: chrome/browser/autocomplete/history_url_provider_unittest.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/history_url_provider.h" 5 #include "chrome/browser/autocomplete/history_url_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "chrome/browser/autocomplete/autocomplete_match.h" 14 #include "chrome/browser/autocomplete/autocomplete_match.h"
15 #include "chrome/browser/autocomplete/history_quick_provider.h" 15 #include "chrome/browser/autocomplete/history_quick_provider.h"
16 #include "chrome/browser/history/history.h" 16 #include "chrome/browser/history/history.h"
17 #include "chrome/browser/net/url_fixer_upper.h" 17 #include "chrome/browser/net/url_fixer_upper.h"
18 #include "chrome/test/base/testing_browser_process.h" 18 #include "chrome/test/base/testing_browser_process.h"
19 #include "chrome/test/base/testing_profile.h" 19 #include "chrome/test/base/testing_profile.h"
20 #include "content/test/test_browser_thread.h" 20 #include "content/test/test_browser_thread.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 22
23 using base::Time; 23 using base::Time;
24 using base::TimeDelta; 24 using base::TimeDelta;
25 25
26 using content::BrowserThread;
27
26 struct TestURLInfo { 28 struct TestURLInfo {
27 const char* url; 29 const char* url;
28 const char* title; 30 const char* title;
29 int visit_count; 31 int visit_count;
30 int typed_count; 32 int typed_count;
31 } test_db[] = { 33 } test_db[] = {
32 {"http://www.google.com/", "Google", 3, 3}, 34 {"http://www.google.com/", "Google", 3, 3},
33 35
34 // High-quality pages should get a host synthesized as a lower-quality match. 36 // High-quality pages should get a host synthesized as a lower-quality match.
35 {"http://slashdot.org/favorite_page.html", "Favorite page", 200, 100}, 37 {"http://slashdot.org/favorite_page.html", "Favorite page", 200, 100},
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 "\\@st" 651 "\\@st"
650 }; 652 };
651 for (size_t i = 0; i < arraysize(test_cases); ++i) { 653 for (size_t i = 0; i < arraysize(test_cases); ++i) {
652 AutocompleteInput input(ASCIIToUTF16(test_cases[i]), string16(), false, 654 AutocompleteInput input(ASCIIToUTF16(test_cases[i]), string16(), false,
653 false, true, AutocompleteInput::ALL_MATCHES); 655 false, true, AutocompleteInput::ALL_MATCHES);
654 autocomplete_->Start(input, false); 656 autocomplete_->Start(input, false);
655 if (!autocomplete_->done()) 657 if (!autocomplete_->done())
656 MessageLoop::current()->Run(); 658 MessageLoop::current()->Run();
657 } 659 }
658 } 660 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698