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

Unified Diff: chrome/browser/shell_integration_linux_unittest.cc

Issue 2186813002: Linux: Support the --class argument (Reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert gtk2_util.cc Created 4 years, 5 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
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 d6a7120a60cf04f6d0c3313ef64be998757e6d7b..abff7f51c94b057c8865a2b4ae595f5587f82fd6 100644
--- a/chrome/browser/shell_integration_linux_unittest.cc
+++ b/chrome/browser/shell_integration_linux_unittest.cc
@@ -654,4 +654,20 @@ TEST(ShellIntegrationTest, GetDirectoryFileContents) {
}
}
+TEST(ShellIntegrationTest, WmClass) {
+ base::CommandLine command_line((base::FilePath()));
+ EXPECT_EQ("foo", internal::GetProgramClassName(command_line, "foo.desktop"));
+ EXPECT_EQ("Foo", internal::GetProgramClassClass(command_line, "foo.desktop"));
+
+ command_line.AppendSwitchASCII("class", "baR");
+ EXPECT_EQ("foo", internal::GetProgramClassName(command_line, "foo.desktop"));
+ EXPECT_EQ("baR", internal::GetProgramClassClass(command_line, "foo.desktop"));
+
+ command_line = base::CommandLine(base::FilePath());
+ command_line.AppendSwitchASCII("user-data-dir", "/tmp/baz");
+ EXPECT_EQ("foo (/tmp/baz)",
+ internal::GetProgramClassName(command_line, "foo.desktop"));
+ EXPECT_EQ("Foo", internal::GetProgramClassClass(command_line, "foo.desktop"));
+}
+
} // namespace shell_integration_linux
« no previous file with comments | « chrome/browser/shell_integration_linux.cc ('k') | chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698