Chromium Code Reviews| 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)); |