summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 07:49:34 +0000
committermukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 07:49:34 +0000
commita2778d393477c2770cc92976897e0d47f516a4c2 (patch)
treed39aef69206d0d1081b4b93055c6212133c59331
parent85aab54f70cb49916c5d79540544eead19f37dc0 (diff)
downloadchromium_src-a2778d393477c2770cc92976897e0d47f516a4c2.zip
chromium_src-a2778d393477c2770cc92976897e0d47f516a4c2.tar.gz
chromium_src-a2778d393477c2770cc92976897e0d47f516a4c2.tar.bz2
Omit the startupWMClass from Aura build.
BUG=chromium:100346 TEST=manually Review URL: http://codereview.chromium.org/8566039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112424 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/shell_integration_unittest.cc36
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++) {