diff options
Diffstat (limited to 'chrome/browser/shell_integration_unittest.cc')
-rw-r--r-- | chrome/browser/shell_integration_unittest.cc | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc index 24a9be8..2b62b59 100644 --- a/chrome/browser/shell_integration_unittest.cc +++ b/chrome/browser/shell_integration_unittest.cc @@ -161,13 +161,7 @@ TEST(ShellIntegrationTest, GetDesktopShortcutFilename) { } } -// Fails on Linux Aura, see http://crbug.com/100346 -#if defined(USE_AURA) && !defined(OS_WIN) -#define MAYBE_GetDesktopFileContents FAILS_GetDesktopFileContents -#else -#define MAYBE_GetDesktopFileContents GetDesktopFileContents -#endif -TEST(ShellIntegrationTest, MAYBE_GetDesktopFileContents) { +TEST(ShellIntegrationTest, GetDesktopFileContents) { const struct { const char* url; const char* title; @@ -211,7 +205,11 @@ TEST(ShellIntegrationTest, MAYBE_GetDesktopFileContents) { "Icon=chrome-http__gmail.com\n" "Type=Application\n" "Categories=Application;Network;WebBrowser;\n" +#if !defined(USE_AURA) + // Aura Chrome creates browser window in a single X11 window, so + // WMClass does not matter. "StartupWMClass=gmail.com\n" +#endif }, // Make sure we don't insert duplicate shebangs. @@ -229,7 +227,11 @@ TEST(ShellIntegrationTest, MAYBE_GetDesktopFileContents) { "Name=GMail\n" "Exec=/opt/google/chrome/google-chrome --app=http://gmail.com/\n" "Icon=chrome-http__gmail.com\n" +#if !defined(USE_AURA) + // Aura Chrome creates browser window in a single X11 window, so + // WMClass does not matter. "StartupWMClass=gmail.com\n" +#endif }, // Make sure i18n-ed comments are removed. @@ -247,7 +249,11 @@ TEST(ShellIntegrationTest, MAYBE_GetDesktopFileContents) { "Name=GMail\n" "Exec=/opt/google/chrome/google-chrome --app=http://gmail.com/\n" "Icon=chrome-http__gmail.com\n" +#if !defined(USE_AURA) + // Aura Chrome creates browser window in a single X11 window, so + // WMClass does not matter. "StartupWMClass=gmail.com\n" +#endif }, // Make sure that empty icons are replaced by the chrome icon. @@ -266,7 +272,11 @@ TEST(ShellIntegrationTest, MAYBE_GetDesktopFileContents) { "Name=GMail\n" "Exec=/opt/google/chrome/google-chrome --app=http://gmail.com/\n" "Icon=/opt/google/chrome/product_logo_48.png\n" +#if !defined(USE_AURA) + // Aura Chrome creates browser window in a single X11 window, so + // WMClass does not matter. "StartupWMClass=gmail.com\n" +#endif }, // Now we're starting to be more evil... @@ -284,7 +294,11 @@ TEST(ShellIntegrationTest, MAYBE_GetDesktopFileContents) { "Exec=/opt/google/chrome/google-chrome " "--app=http://evil.com/evil%20--join-the-b0tnet\n" "Icon=chrome-http__evil.com_evil\n" +#if !defined(USE_AURA) + // Aura Chrome creates browser window in a single X11 window, so + // WMClass does not matter. "StartupWMClass=evil.com__evil%20--join-the-b0tnet\n" +#endif }, { "http://evil.com/evil; rm -rf /; \"; rm -rf $HOME >ownz0red", "Innocent Title", @@ -304,8 +318,12 @@ TEST(ShellIntegrationTest, MAYBE_GetDesktopFileContents) { // be; finally, \\ becomes \\\\ when represented in a C++ string! "-rf%20\\\\$HOME%20%3Eownz0red\"\n" "Icon=chrome-http__evil.com_evil\n" +#if !defined(USE_AURA) + // Aura Chrome creates browser window in a single X11 window, so + // WMClass does not matter. "StartupWMClass=evil.com__evil;%20rm%20-rf%20_;%20%22;%20" "rm%20-rf%20$HOME%20%3Eownz0red\n" +#endif }, { "http://evil.com/evil | cat `echo ownz0red` >/dev/null", "Innocent Title", @@ -322,8 +340,12 @@ TEST(ShellIntegrationTest, MAYBE_GetDesktopFileContents) { "--app=http://evil.com/evil%20%7C%20cat%20%60echo%20ownz0red" "%60%20%3E/dev/null\n" "Icon=chrome-http__evil.com_evil\n" +#if !defined(USE_AURA) + // Aura Chrome creates browser window in a single X11 window, so + // WMClass does not matter. "StartupWMClass=evil.com__evil%20%7C%20cat%20%60echo%20ownz0red" "%60%20%3E_dev_null\n" +#endif }, }; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); i++) { |