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

Unified Diff: chrome/browser/web_applications/web_app_mac_unittest.mm

Issue 9426030: Mac: Enable WebAppShortcutCreatorTest.CreateShortcut unit test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace fixes Created 8 years, 10 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 | « chrome/browser/web_applications/web_app_mac.mm ('k') | chrome/common/mac/app_mode_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_applications/web_app_mac_unittest.mm
diff --git a/chrome/browser/web_applications/web_app_mac_unittest.mm b/chrome/browser/web_applications/web_app_mac_unittest.mm
index 389f0ca1a218455029ebfbb88698a0121d40e51e..5d61b241d8e6c5dbcb02369d4c052c91a5ba9224 100644
--- a/chrome/browser/web_applications/web_app_mac_unittest.mm
+++ b/chrome/browser/web_applications/web_app_mac_unittest.mm
@@ -29,6 +29,7 @@ class WebAppShortcutCreatorMock : public web_app::WebAppShortcutCreator {
}
MOCK_CONST_METHOD1(GetDestinationPath, FilePath(const FilePath&));
+ MOCK_CONST_METHOD1(RevealGeneratedBundleInFinder, void(const FilePath&));
};
ShellIntegration::ShortcutInfo GetShortcutInfo() {
@@ -39,11 +40,7 @@ ShellIntegration::ShortcutInfo GetShortcutInfo() {
return info;
}
-// This test is disabled for the following reasons:
-// * The plist still isn't filled in correctly.
-// * WebAppShortcutCreator::CreateShortcut() opens a Finder window which it
-// shouldn't be doing when run from a unit test.
-TEST(WebAppShortcutCreatorTest, DISABLED_CreateShortcut) {
+TEST(WebAppShortcutCreatorTest, CreateShortcut) {
ScopedTempDir scoped_temp_dir;
EXPECT_TRUE(scoped_temp_dir.CreateUniqueTempDir());
FilePath dst_path = scoped_temp_dir.path().Append("a.app");
@@ -52,6 +49,8 @@ TEST(WebAppShortcutCreatorTest, DISABLED_CreateShortcut) {
NiceMock<WebAppShortcutCreatorMock> shortcut_creator(info);
EXPECT_CALL(shortcut_creator, GetDestinationPath(_))
.WillRepeatedly(Return(dst_path));
+ EXPECT_CALL(shortcut_creator, RevealGeneratedBundleInFinder(dst_path));
sail 2012/02/20 17:47:11 why do you need this?
jeremy 2012/02/21 13:22:36 To make sure that the function is called with the
+
EXPECT_TRUE(shortcut_creator.CreateShortcut());
EXPECT_TRUE(file_util::PathExists(dst_path));
« no previous file with comments | « chrome/browser/web_applications/web_app_mac.mm ('k') | chrome/common/mac/app_mode_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698