diff options
author | cira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-07 22:49:10 +0000 |
---|---|---|
committer | cira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-07 22:49:10 +0000 |
commit | ecabe6eed156a36238888bfd2fdb96ec4906f0a4 (patch) | |
tree | 9419d9a349fc940d45fa450b3a75169fdf48b39f /chrome/common/extensions/extension_unittest.cc | |
parent | 7050861ff094fd74d155264b6da3ca3795543870 (diff) | |
download | chromium_src-ecabe6eed156a36238888bfd2fdb96ec4906f0a4.zip chromium_src-ecabe6eed156a36238888bfd2fdb96ec4906f0a4.tar.gz chromium_src-ecabe6eed156a36238888bfd2fdb96ec4906f0a4.tar.bz2 |
Loads local resources from current locale subtree if available, if not it falls back to extension subtree.
We look for ext_root/foo/bar.js under ext_root/_locales/fr/foo/bar.js if current locale is fr. If there is no fr specific resource we load ext_root/foo/bar.js instead.
Lots of small refactoring to replace FilePath with ExtensionResource.
BUG=12131
TEST=See unittest for sample tree.
Review URL: http://codereview.chromium.org/256022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28333 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension_unittest.cc')
-rw-r--r-- | chrome/common/extensions/extension_unittest.cc | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc index 466f27a..26cf648 100644 --- a/chrome/common/extensions/extension_unittest.cc +++ b/chrome/common/extensions/extension_unittest.cc @@ -262,15 +262,6 @@ TEST(ExtensionTest, GetResourceURLAndPath) { Extension::GetResourceURL(extension.url(), "bar/../baz.js").spec()); EXPECT_EQ(extension.url().spec() + "baz.js", Extension::GetResourceURL(extension.url(), "../baz.js").spec()); - - EXPECT_EQ(path.Append(FILE_PATH_LITERAL("bar")) - .Append(FILE_PATH_LITERAL("baz.js")).value(), - Extension::GetResourcePath(extension.path(), "bar/baz.js").value()); - EXPECT_EQ(path.Append(FILE_PATH_LITERAL("baz.js")).value(), - Extension::GetResourcePath(extension.path(), "bar/../baz.js") - .value()); - EXPECT_EQ(FilePath().value(), - Extension::GetResourcePath(extension.path(), "../baz.js").value()); } TEST(ExtensionTest, LoadPageActionHelper) { |