summaryrefslogtreecommitdiffstats
path: root/chrome/browser/shell_integration_unittest.cc
diff options
context:
space:
mode:
authormgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-08 13:42:23 +0000
committermgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-08 13:42:23 +0000
commit8ea93018bbadaa5a550ae1777ebedf1d214cc111 (patch)
tree88e6764b2643f9507b60fad92a7a037b3820e70c /chrome/browser/shell_integration_unittest.cc
parent850e2d2d3dd8cd12e2919547578fed0afa3e591f (diff)
downloadchromium_src-8ea93018bbadaa5a550ae1777ebedf1d214cc111.zip
chromium_src-8ea93018bbadaa5a550ae1777ebedf1d214cc111.tar.gz
chromium_src-8ea93018bbadaa5a550ae1777ebedf1d214cc111.tar.bz2
Avoid crash in Linux Debug build creating shortcuts.
If desktop template file is invalid, WARNING, not DCHECK. (This is not a programming error, so it should not cause debug build to crash.) Also fixed a small memory leak in this case. BUG=180811 Review URL: https://chromiumcodereview.appspot.com/12439003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186946 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_integration_unittest.cc')
-rw-r--r--chrome/browser/shell_integration_unittest.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc
index 30df2d4..0b81311 100644
--- a/chrome/browser/shell_integration_unittest.cc
+++ b/chrome/browser/shell_integration_unittest.cc
@@ -391,6 +391,10 @@ TEST(ShellIntegrationTest, GetDesktopFileContents) {
// Dumb case.
{ "ignored", "ignored", "ignored", false, "", "#!/usr/bin/env xdg-open\n" },
+ // Invalid desktop file.
+ { "ignored", "ignored", "ignored", false, "[Desktop\n",
+ "#!/usr/bin/env xdg-open\n" },
+
// Non-empty file without [Desktop Entry].
// This tests a different code path to the above.
{ "http://gmail.com",