Index: content/browser/site_instance_unittest.cc |
diff --git a/content/browser/site_instance_unittest.cc b/content/browser/site_instance_unittest.cc |
index 8bda89e22ceaf78353da12b0df31bcab1d197099..6931e5aef9ff81c20e2d083a3cea83104fc342dd 100644 |
--- a/content/browser/site_instance_unittest.cc |
+++ b/content/browser/site_instance_unittest.cc |
@@ -24,10 +24,6 @@ |
namespace { |
-// TODO(estade): this shouldn't need to be chrome:, but it does (or else GURL |
-// doesn't think that the webui URLs have a host). Figure out where this is |
-// coming from and fix it. |
-const char kWebUIScheme[] = "chrome"; |
const char kSameAsAnyInstanceURL[] = "about:internets"; |
class SiteInstanceTestWebUIFactory : public content::EmptyWebUIFactory { |
@@ -36,7 +32,7 @@ class SiteInstanceTestWebUIFactory : public content::EmptyWebUIFactory { |
return HasWebUIScheme(url); |
} |
virtual bool HasWebUIScheme(const GURL& url) const { |
- return url.SchemeIs(kWebUIScheme); |
+ return url.SchemeIs(chrome::kChromeUIScheme); |
} |
}; |
@@ -47,7 +43,8 @@ class SiteInstanceTestBrowserClient : public content::ContentBrowserClient { |
} |
virtual bool IsURLSameAsAnySiteInstance(const GURL& url) OVERRIDE { |
- return url.spec() == kSameAsAnyInstanceURL; |
+ return url == GURL(kSameAsAnyInstanceURL) || |
+ url == GURL(chrome::kAboutCrashURL); |
} |
private: |
@@ -492,14 +489,12 @@ TEST_F(SiteInstanceTest, ProcessSharingByType) { |
extension2_instance->GetProcess()); |
// Create some WebUI instances and make sure they share a process. |
- scoped_refptr<SiteInstance> webui1_instance( |
- CreateSiteInstance(&rph_factory, |
- GURL(kWebUIScheme + std::string("://newtab")))); |
+ scoped_refptr<SiteInstance> webui1_instance(CreateSiteInstance(&rph_factory, |
+ GURL(chrome::kChromeUIScheme + std::string("://newtab")))); |
policy->GrantWebUIBindings(webui1_instance->GetProcess()->id()); |
- scoped_refptr<SiteInstance> webui2_instance( |
- CreateSiteInstance(&rph_factory, |
- GURL(kWebUIScheme + std::string("://history")))); |
+ scoped_refptr<SiteInstance> webui2_instance( CreateSiteInstance(&rph_factory, |
+ GURL(chrome::kChromeUIScheme + std::string("://history")))); |
scoped_ptr<RenderProcessHost> dom_host(webui1_instance->GetProcess()); |
EXPECT_EQ(webui1_instance->GetProcess(), webui2_instance->GetProcess()); |