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

Unified Diff: content/browser/site_instance_unittest.cc

Issue 7064052: Revert 88142 to fix sync_integration_tests offline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | « content/browser/site_instance.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/site_instance_unittest.cc
===================================================================
--- content/browser/site_instance_unittest.cc (revision 88158)
+++ content/browser/site_instance_unittest.cc (working copy)
@@ -24,6 +24,10 @@
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 {
@@ -32,7 +36,7 @@
return HasWebUIScheme(url);
}
virtual bool HasWebUIScheme(const GURL& url) const {
- return url.SchemeIs(chrome::kChromeUIScheme);
+ return url.SchemeIs(kWebUIScheme);
}
};
@@ -43,8 +47,7 @@
}
virtual bool IsURLSameAsAnySiteInstance(const GURL& url) OVERRIDE {
- return url == GURL(kSameAsAnyInstanceURL) ||
- url == GURL(chrome::kAboutCrashURL);
+ return url.spec() == kSameAsAnyInstanceURL;
}
private:
@@ -489,12 +492,14 @@
extension2_instance->GetProcess());
// Create some WebUI instances and make sure they share a process.
- scoped_refptr<SiteInstance> webui1_instance(CreateSiteInstance(&rph_factory,
- GURL(chrome::kChromeUIScheme + std::string("://newtab"))));
+ scoped_refptr<SiteInstance> webui1_instance(
+ CreateSiteInstance(&rph_factory,
+ GURL(kWebUIScheme + std::string("://newtab"))));
policy->GrantWebUIBindings(webui1_instance->GetProcess()->id());
- scoped_refptr<SiteInstance> webui2_instance( CreateSiteInstance(&rph_factory,
- GURL(chrome::kChromeUIScheme + std::string("://history"))));
+ scoped_refptr<SiteInstance> webui2_instance(
+ CreateSiteInstance(&rph_factory,
+ GURL(kWebUIScheme + std::string("://history"))));
scoped_ptr<RenderProcessHost> dom_host(webui1_instance->GetProcess());
EXPECT_EQ(webui1_instance->GetProcess(), webui2_instance->GetProcess());
« no previous file with comments | « content/browser/site_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698