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

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

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 (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 "chrome/browser/autocomplete/history_quick_provider.h" 5 #include "chrome/browser/autocomplete/history_quick_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 explicit SetShouldContain(const ACMatches& matched_urls); 97 explicit SetShouldContain(const ACMatches& matched_urls);
98 98
99 void operator()(const std::string& expected); 99 void operator()(const std::string& expected);
100 100
101 std::set<std::string> LeftOvers() const { return matches_; } 101 std::set<std::string> LeftOvers() const { return matches_; }
102 102
103 private: 103 private:
104 std::set<std::string> matches_; 104 std::set<std::string> matches_;
105 }; 105 };
106 106
107 void SetUp(); 107 virtual void SetUp();
108 void TearDown(); 108 virtual void TearDown();
109 109
110 virtual void GetTestData(size_t* data_count, TestURLInfo** test_data); 110 virtual void GetTestData(size_t* data_count, TestURLInfo** test_data);
111 111
112 // Fills test data into the history system. 112 // Fills test data into the history system.
113 void FillData(); 113 void FillData();
114 114
115 // Runs an autocomplete query on |text| and checks to see that the returned 115 // Runs an autocomplete query on |text| and checks to see that the returned
116 // results' destination URLs match those provided. |expected_urls| does not 116 // results' destination URLs match those provided. |expected_urls| does not
117 // need to be in sorted order. 117 // need to be in sorted order.
118 void RunTest(const string16 text, 118 void RunTest(const string16 text,
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 } 574 }
575 575
576 TEST_F(HQPOrderingTest, TEAMatch) { 576 TEST_F(HQPOrderingTest, TEAMatch) {
577 std::vector<std::string> expected_urls; 577 std::vector<std::string> expected_urls;
578 expected_urls.push_back("http://www.teamliquid.net/"); 578 expected_urls.push_back("http://www.teamliquid.net/");
579 expected_urls.push_back("http://www.teamliquid.net/tlpd"); 579 expected_urls.push_back("http://www.teamliquid.net/tlpd");
580 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); 580 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players");
581 RunTest(ASCIIToUTF16("tea"), expected_urls, true, 581 RunTest(ASCIIToUTF16("tea"), expected_urls, true,
582 ASCIIToUTF16("www.teamliquid.net")); 582 ASCIIToUTF16("www.teamliquid.net"));
583 } 583 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698