summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/extension_unittest.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-04 06:46:21 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-04 06:46:21 +0000
commitd2817019145d7806d400ae70bf9fb4b5681905c8 (patch)
tree21cf799953ab964c5d089bdb519b86bae4823269 /chrome/common/extensions/extension_unittest.cc
parenta3a63ff836382403dc681befbd1cc866e8e5c117 (diff)
downloadchromium_src-d2817019145d7806d400ae70bf9fb4b5681905c8.zip
chromium_src-d2817019145d7806d400ae70bf9fb4b5681905c8.tar.gz
chromium_src-d2817019145d7806d400ae70bf9fb4b5681905c8.tar.bz2
Implement first cut at the extension installation prompt on Windows.
Had to move set_path() earlier in the unpack process so that we would have real paths for the resources, so that we could load and display the icon in the ui. This exposed a problem where page actions had absolute paths and other images in extensions had relative paths. Extension::GetBrowserImages() was expecting relative paths, and it just happened to work because in both cases Extension was initialized without a path. Modified page actions to use relative paths to be consistent with other images. Review URL: http://codereview.chromium.org/160516 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22368 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension_unittest.cc')
-rw-r--r--chrome/common/extensions/extension_unittest.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc
index a33f40c..6eba35a 100644
--- a/chrome/common/extensions/extension_unittest.cc
+++ b/chrome/common/extensions/extension_unittest.cc
@@ -279,8 +279,8 @@ TEST(ExtensionTest, LoadPageActionHelper) {
// Now setup some values to use in the page action.
const std::string id("MyPageActionId");
const std::string name("MyPageActionName");
- FilePath::StringType img1 = FILE_PATH_LITERAL("image1.png");
- FilePath::StringType img2 = FILE_PATH_LITERAL("image2.png");
+ std::string img1("image1.png");
+ std::string img2("image2.png");
// Add the page_actions dictionary.
input.SetString(keys::kPageActionId, id);
@@ -297,8 +297,8 @@ TEST(ExtensionTest, LoadPageActionHelper) {
ASSERT_STREQ(id.c_str(), page_action->id().c_str());
ASSERT_STREQ(name.c_str(), page_action->name().c_str());
ASSERT_EQ(2u, page_action->icon_paths().size());
- ASSERT_STREQ(img1.c_str(), page_action->icon_paths()[0].value().c_str());
- ASSERT_STREQ(img2.c_str(), page_action->icon_paths()[1].value().c_str());
+ ASSERT_STREQ(img1.c_str(), page_action->icon_paths()[0].c_str());
+ ASSERT_STREQ(img2.c_str(), page_action->icon_paths()[1].c_str());
// Type hasn't been set, but it defaults to PERMANENT.
ASSERT_EQ(PageAction::PERMANENT, page_action->type());