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

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

Issue 13513004: content: Move more constants into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/builtin_provider.h" 5 #include "chrome/browser/autocomplete/builtin_provider.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/autocomplete/autocomplete_input.h" 9 #include "chrome/browser/autocomplete/autocomplete_input.h"
10 #include "chrome/browser/autocomplete/autocomplete_match.h" 10 #include "chrome/browser/autocomplete/autocomplete_match.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 TEST_F(BuiltinProviderTest, ChromeURLs) { 138 TEST_F(BuiltinProviderTest, ChromeURLs) {
139 const string16 kAbout = ASCIIToUTF16(chrome::kAboutScheme); 139 const string16 kAbout = ASCIIToUTF16(chrome::kAboutScheme);
140 const string16 kChrome = ASCIIToUTF16(chrome::kChromeUIScheme); 140 const string16 kChrome = ASCIIToUTF16(chrome::kChromeUIScheme);
141 const string16 kSeparator1 = ASCIIToUTF16(":"); 141 const string16 kSeparator1 = ASCIIToUTF16(":");
142 const string16 kSeparator2 = ASCIIToUTF16(":/"); 142 const string16 kSeparator2 = ASCIIToUTF16(":/");
143 const string16 kSeparator3 = ASCIIToUTF16(content::kStandardSchemeSeparator); 143 const string16 kSeparator3 = ASCIIToUTF16(content::kStandardSchemeSeparator);
144 144
145 // This makes assumptions about the chrome URLs listed by the BuiltinProvider. 145 // This makes assumptions about the chrome URLs listed by the BuiltinProvider.
146 // Currently they are derived from ChromePaths() in browser_about_handler.cc. 146 // Currently they are derived from ChromePaths() in browser_about_handler.cc.
147 const string16 kHostM1 = ASCIIToUTF16(chrome::kChromeUIMediaInternalsHost); 147 const string16 kHostM1 = ASCIIToUTF16(content::kChromeUIMediaInternalsHost);
148 const string16 kHostM2 = ASCIIToUTF16(chrome::kChromeUIMemoryHost); 148 const string16 kHostM2 = ASCIIToUTF16(chrome::kChromeUIMemoryHost);
149 const GURL kURLM1 = GURL(kChrome + kSeparator3 + kHostM1); 149 const GURL kURLM1 = GURL(kChrome + kSeparator3 + kHostM1);
150 const GURL kURLM2 = GURL(kChrome + kSeparator3 + kHostM2); 150 const GURL kURLM2 = GURL(kChrome + kSeparator3 + kHostM2);
151 151
152 test_data<GURL> chrome_url_cases[] = { 152 test_data<GURL> chrome_url_cases[] = {
153 // Typing an about URL with an unknown host should give nothing. 153 // Typing an about URL with an unknown host should give nothing.
154 {kAbout + kSeparator1 + ASCIIToUTF16("host"), 0, {}}, 154 {kAbout + kSeparator1 + ASCIIToUTF16("host"), 0, {}},
155 {kAbout + kSeparator2 + ASCIIToUTF16("host"), 0, {}}, 155 {kAbout + kSeparator2 + ASCIIToUTF16("host"), 0, {}},
156 {kAbout + kSeparator3 + ASCIIToUTF16("host"), 0, {}}, 156 {kAbout + kSeparator3 + ASCIIToUTF16("host"), 0, {}},
157 157
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 {kSettings + kPage1.substr(0, 2), 1, {kURL1}}, 205 {kSettings + kPage1.substr(0, 2), 1, {kURL1}},
206 {kSettings + kPage1.substr(0, kPage1.length() - 1), 1, {kURL1}}, 206 {kSettings + kPage1.substr(0, kPage1.length() - 1), 1, {kURL1}},
207 {kSettings + kPage1, 1, {kURL1}}, 207 {kSettings + kPage1, 1, {kURL1}},
208 {kSettings + kPage2, 1, {kURL2}}, 208 {kSettings + kPage2, 1, {kURL2}},
209 }; 209 };
210 210
211 RunTest<GURL>(settings_subpage_cases, arraysize(settings_subpage_cases), 211 RunTest<GURL>(settings_subpage_cases, arraysize(settings_subpage_cases),
212 &AutocompleteMatch::destination_url); 212 &AutocompleteMatch::destination_url);
213 } 213 }
214 #endif 214 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698