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

Unified Diff: chrome/browser/browser_about_handler_unittest.cc

Issue 7068007: Revise about: and chrome: url handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update special_tabs.py from Nirnimesh's codereview.chromium.org/6995057/. Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_about_handler_unittest.cc
diff --git a/chrome/browser/browser_about_handler_unittest.cc b/chrome/browser/browser_about_handler_unittest.cc
index 9b305509eabd53b7e1318776c195aec09a127864..064e807b44281c9a88a04e33df7d59bdec093e1f 100644
--- a/chrome/browser/browser_about_handler_unittest.cc
+++ b/chrome/browser/browser_about_handler_unittest.cc
@@ -16,6 +16,8 @@
typedef TestingBrowserProcessTest BrowserAboutHandlerTest;
TEST_F(BrowserAboutHandlerTest, WillHandleBrowserAboutURL) {
+ std::string chrome_prefix(chrome::kChromeUIScheme);
+ chrome_prefix.append(chrome::kStandardSchemeSeparator);
struct AboutURLTestData {
GURL test_url;
GURL result_url;
@@ -35,71 +37,71 @@ TEST_F(BrowserAboutHandlerTest, WillHandleBrowserAboutURL) {
false
},
{
- GURL(std::string(chrome::kAboutCacheURL) + "/mercury"),
- GURL(std::string(chrome::kNetworkViewCacheURL) + "mercury"),
- false,
- true
+ GURL(chrome_prefix + chrome::kChromeUICrashHost),
+ GURL(chrome_prefix + chrome::kChromeUICrashHost),
+ true,
+ false
},
{
- GURL(std::string(chrome::kAboutNetInternalsURL) + "/venus"),
- GURL(std::string(chrome::kNetworkViewInternalsURL) + "venus"),
- false,
- true
+ GURL(chrome_prefix + chrome::kChromeUIKillHost),
+ GURL(chrome_prefix + chrome::kChromeUIKillHost),
+ true,
+ false
},
{
- GURL(std::string(chrome::kAboutGpuURL) + "/jupiter"),
- GURL(std::string(chrome::kGpuInternalsURL) + "jupiter"),
- false,
- true
+ GURL(chrome_prefix + chrome::kChromeUIHangHost),
+ GURL(chrome_prefix + chrome::kChromeUIHangHost),
+ true,
+ false
},
{
- GURL(std::string(chrome::kAboutAppCacheInternalsURL) + "/earth"),
- GURL(std::string(chrome::kAppCacheViewInternalsURL) + "earth"),
- false,
- true
+ GURL(chrome_prefix + chrome::kChromeUIShorthangHost),
+ GURL(chrome_prefix + chrome::kChromeUIShorthangHost),
+ true,
+ false
},
{
- GURL(chrome::kAboutPluginsURL),
- GURL(chrome::kChromeUIPluginsURL),
+ GURL(chrome_prefix + chrome::kChromeUIMemoryHost),
+ GURL(chrome_prefix + chrome::kChromeUIMemoryHost),
false,
true
},
{
- GURL(chrome::kAboutCrashURL),
- GURL(chrome::kAboutCrashURL),
- true,
- false
+ GURL(chrome_prefix + chrome::kChromeUIDefaultHost),
+ GURL(chrome_prefix + chrome::kChromeUIVersionHost),
+ false,
+ true
},
{
- GURL(chrome::kAboutKillURL),
- GURL(chrome::kAboutKillURL),
- true,
- false
+ GURL(chrome_prefix + chrome::kChromeUIAboutHost),
+ GURL(chrome_prefix + chrome::kChromeUIChromeURLsHost),
+ false,
+ true
},
{
- GURL(chrome::kAboutHangURL),
- GURL(chrome::kAboutHangURL),
- true,
- false
+ GURL(chrome_prefix + chrome::kChromeUICacheHost),
+ GURL(chrome_prefix + chrome::kChromeUINetworkViewCacheHost),
+ false,
+ true
},
{
- GURL(chrome::kAboutShorthangURL),
- GURL(chrome::kAboutShorthangURL),
- true,
- false
+ GURL(chrome_prefix + chrome::kChromeUIGpuHost),
+ GURL(chrome_prefix + chrome::kChromeUIGpuInternalsHost),
+ false,
+ true
},
{
- GURL("about:memory"),
- GURL("chrome://about/memory-redirect"),
+ GURL(chrome_prefix + chrome::kChromeUISyncHost),
+ GURL(chrome_prefix + chrome::kChromeUISyncInternalsHost),
false,
true
},
{
- GURL("about:mars"),
- GURL("chrome://about/mars"),
+ GURL(chrome_prefix + "host/path?query#ref"),
+ GURL(chrome_prefix + "host/path?query#ref"),
false,
true
- },
+ }
};
MessageLoopForUI message_loop;
BrowserThread ui_thread(BrowserThread::UI, &message_loop);
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698