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

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: 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 d0d6a7f91c6b27dbdbceb2b9a9694bb830bf9fbd..cccce451d766459c6618354c60d4bd9705e1d591 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) {
@@ -189,6 +193,7 @@ TEST(ExtensionTest, GetAbsolutePathNoError) {
extension->GetResource("test.html").GetFilePath().value());
EXPECT_EQ(extension->path().AppendASCII("test.js").value(),
extension->GetResource("test.js").GetFilePath().value());
+
Aaron Boodman 2012/05/10 16:49:08 Remove spurious change.
Greg Billock 2012/05/14 16:09:55 Done.
}
TEST(ExtensionTest, LoadPageActionHelper) {

Powered by Google App Engine
This is Rietveld 408576698