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

Unified Diff: chrome/browser/shell_integration_linux_unittest.cc

Issue 253403002: Linux: The App Launcher now appears on the "Internet" menu, not "Other". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use a global array, instead of a global pointer to a string. Created 6 years, 8 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/shell_integration_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration_linux_unittest.cc
diff --git a/chrome/browser/shell_integration_linux_unittest.cc b/chrome/browser/shell_integration_linux_unittest.cc
index d1f1816edaffe23f44886e1946507544fddafb07..cdfd247c58f1654532973c6db71fe758c89ca12e 100644
--- a/chrome/browser/shell_integration_linux_unittest.cc
+++ b/chrome/browser/shell_integration_linux_unittest.cc
@@ -446,6 +446,7 @@ TEST(ShellIntegrationTest, GetDesktopFileContents) {
const char* url;
const char* title;
const char* icon_name;
+ const char* categories;
bool nodisplay;
const char* expected_output;
} test_cases[] = {
@@ -453,6 +454,7 @@ TEST(ShellIntegrationTest, GetDesktopFileContents) {
{ "http://gmail.com",
"GMail",
"chrome-http__gmail.com",
+ "",
false,
"#!/usr/bin/env xdg-open\n"
@@ -470,6 +472,7 @@ TEST(ShellIntegrationTest, GetDesktopFileContents) {
{ "http://gmail.com",
"GMail",
"",
+ "",
false,
"#!/usr/bin/env xdg-open\n"
@@ -487,10 +490,11 @@ TEST(ShellIntegrationTest, GetDesktopFileContents) {
"StartupWMClass=gmail.com\n"
},
- // Test adding NoDisplay=true.
+ // Test adding categories and NoDisplay=true.
{ "http://gmail.com",
"GMail",
"chrome-http__gmail.com",
+ "Graphics;Education;",
true,
"#!/usr/bin/env xdg-open\n"
@@ -501,6 +505,7 @@ TEST(ShellIntegrationTest, GetDesktopFileContents) {
"Name=GMail\n"
"Exec=/opt/google/chrome/google-chrome --app=http://gmail.com/\n"
"Icon=chrome-http__gmail.com\n"
+ "Categories=Graphics;Education;\n"
"NoDisplay=true\n"
"StartupWMClass=gmail.com\n"
},
@@ -509,6 +514,7 @@ TEST(ShellIntegrationTest, GetDesktopFileContents) {
{ "http://evil.com/evil --join-the-b0tnet",
"Ownz0red\nExec=rm -rf /",
"chrome-http__evil.com_evil",
+ "",
false,
"#!/usr/bin/env xdg-open\n"
@@ -525,6 +531,7 @@ TEST(ShellIntegrationTest, GetDesktopFileContents) {
{ "http://evil.com/evil; rm -rf /; \"; rm -rf $HOME >ownz0red",
"Innocent Title",
"chrome-http__evil.com_evil",
+ "",
false,
"#!/usr/bin/env xdg-open\n"
@@ -546,6 +553,7 @@ TEST(ShellIntegrationTest, GetDesktopFileContents) {
{ "http://evil.com/evil | cat `echo ownz0red` >/dev/null",
"Innocent Title",
"chrome-http__evil.com_evil",
+ "",
false,
"#!/usr/bin/env xdg-open\n"
@@ -575,6 +583,7 @@ TEST(ShellIntegrationTest, GetDesktopFileContents) {
base::ASCIIToUTF16(test_cases[i].title),
test_cases[i].icon_name,
base::FilePath(),
+ test_cases[i].categories,
test_cases[i].nodisplay));
}
}
@@ -592,6 +601,7 @@ TEST(ShellIntegrationTest, GetDesktopFileContentsAppList) {
"Name=Chrome App Launcher\n"
"Exec=/opt/google/chrome/google-chrome --show-app-list\n"
"Icon=chrome_app_list\n"
+ "Categories=Network;WebBrowser;\n"
"StartupWMClass=chrome-app-list\n",
ShellIntegrationLinux::GetDesktopFileContentsForCommand(
command_line,
@@ -599,6 +609,7 @@ TEST(ShellIntegrationTest, GetDesktopFileContentsAppList) {
GURL(),
base::ASCIIToUTF16("Chrome App Launcher"),
"chrome_app_list",
+ "Network;WebBrowser;",
false));
}
« no previous file with comments | « chrome/browser/shell_integration_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698