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

Unified Diff: chrome/common/extensions/extension_unittest.cc

Issue 10384072: Update to handle absolute-looking paths in manifests and still produce nice-looking URLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 8 years, 7 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
Index: chrome/common/extensions/extension_unittest.cc
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc
index f64c69e443852a98381122a2606279da1acca066..b72176c8a6b209ef910b684fbaadb83a34249f81 100644
--- a/chrome/common/extensions/extension_unittest.cc
+++ b/chrome/common/extensions/extension_unittest.cc
@@ -176,6 +176,10 @@ TEST(ExtensionTest, GetResourceURLAndPath) {
"bar/../baz.js").spec());
EXPECT_EQ(extension->url().spec() + "baz.js",
Extension::GetResourceURL(extension->url(), "../baz.js").spec());
+
+ // Test that absolute-looking paths ("/"-prefixed) are pasted correctly.
+ EXPECT_EQ(extension->url().spec() + "test.html",
+ extension->GetResourceURL("/test.html").spec());
}
TEST(ExtensionTest, GetAbsolutePathNoError) {
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/common/extensions/manifest_tests/extension_manifests_web_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698