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

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

Issue 7795042: Merge 99883 - Completely disable about:flags (Closed) Base URL: svn://svn.chromium.org/chrome/branches/835/src/
Patch Set: Created 9 years, 3 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 | « chrome/browser/about_flags_unittest.cc ('k') | 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) 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/autocomplete/autocomplete_match.h" 7 #include "chrome/browser/autocomplete/autocomplete_match.h"
8 #include "chrome/browser/autocomplete/builtin_provider.h" 8 #include "chrome/browser/autocomplete/builtin_provider.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "chrome/test/testing_browser_process.h" 10 #include "chrome/test/testing_browser_process.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 {ASCIIToUTF16("scheme://"), 0, {}}, 125 {ASCIIToUTF16("scheme://"), 0, {}},
126 {ASCIIToUTF16("scheme://host"), 0, {}}, 126 {ASCIIToUTF16("scheme://host"), 0, {}},
127 {ASCIIToUTF16("scheme:host/path?query#ref"), 0, {}}, 127 {ASCIIToUTF16("scheme:host/path?query#ref"), 0, {}},
128 {ASCIIToUTF16("scheme://host/path?query#ref"), 0, {}}, 128 {ASCIIToUTF16("scheme://host/path?query#ref"), 0, {}},
129 }; 129 };
130 130
131 RunTest<GURL>(non_chrome_url_cases, arraysize(non_chrome_url_cases), 131 RunTest<GURL>(non_chrome_url_cases, arraysize(non_chrome_url_cases),
132 &AutocompleteMatch::destination_url); 132 &AutocompleteMatch::destination_url);
133 } 133 }
134 134
135 TEST_F(BuiltinProviderTest, ChromeURLs) { 135 TEST_F(BuiltinProviderTest, DISABLED_ChromeURLs) {
136 const string16 kAbout = ASCIIToUTF16(chrome::kAboutScheme); 136 const string16 kAbout = ASCIIToUTF16(chrome::kAboutScheme);
137 const string16 kChrome = ASCIIToUTF16(chrome::kChromeUIScheme); 137 const string16 kChrome = ASCIIToUTF16(chrome::kChromeUIScheme);
138 const string16 kSeparator1 = ASCIIToUTF16(":"); 138 const string16 kSeparator1 = ASCIIToUTF16(":");
139 const string16 kSeparator2 = ASCIIToUTF16(":/"); 139 const string16 kSeparator2 = ASCIIToUTF16(":/");
140 const string16 kSeparator3 = ASCIIToUTF16(chrome::kStandardSchemeSeparator); 140 const string16 kSeparator3 = ASCIIToUTF16(chrome::kStandardSchemeSeparator);
141 141
142 // This makes assumptions about the chrome URLs listed by the BuiltinProvider. 142 // This makes assumptions about the chrome URLs listed by the BuiltinProvider.
143 // Currently they are derived from ChromePaths() in browser_about_handler.cc. 143 // Currently they are derived from ChromePaths() in browser_about_handler.cc.
144 const string16 kHostE = ASCIIToUTF16(chrome::kChromeUIExtensionsHost); 144 const string16 kHostE = ASCIIToUTF16(chrome::kChromeUIExtensionsHost);
145 const GURL kURLE = GURL(kChrome + kSeparator3 + kHostE); 145 const GURL kURLE = GURL(kChrome + kSeparator3 + kHostE);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 {kSettings + kPage1.substr(0, 1), 2, {kURL1, kURL2}}, 219 {kSettings + kPage1.substr(0, 1), 2, {kURL1, kURL2}},
220 {kSettings + kPage1.substr(0, 2), 1, {kURL1}}, 220 {kSettings + kPage1.substr(0, 2), 1, {kURL1}},
221 {kSettings + kPage1.substr(0, kPage1.length() - 1), 1, {kURL1}}, 221 {kSettings + kPage1.substr(0, kPage1.length() - 1), 1, {kURL1}},
222 {kSettings + kPage1, 1, {kURL1}}, 222 {kSettings + kPage1, 1, {kURL1}},
223 {kSettings + kPage2, 1, {kURL2}}, 223 {kSettings + kPage2, 1, {kURL2}},
224 }; 224 };
225 225
226 RunTest<GURL>(settings_subpage_cases, arraysize(settings_subpage_cases), 226 RunTest<GURL>(settings_subpage_cases, arraysize(settings_subpage_cases),
227 &AutocompleteMatch::destination_url); 227 &AutocompleteMatch::destination_url);
228 } 228 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags_unittest.cc ('k') | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698