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

Unified Diff: chrome/installer/util/shell_util_unittest.cc

Issue 669943003: shell_util: AddFileAssociations now correctly quotes "%1" arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/installer/util/shell_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/shell_util_unittest.cc
diff --git a/chrome/installer/util/shell_util_unittest.cc b/chrome/installer/util/shell_util_unittest.cc
index a6de4c56bc2a3e79ce264de51bc8ae16bc933fca..1897e8b33e7893ab47c9c714d63e936d51dafe0c 100644
--- a/chrome/installer/util/shell_util_unittest.cc
+++ b/chrome/installer/util/shell_util_unittest.cc
@@ -825,7 +825,10 @@ class ShellUtilRegistryTest : public testing::Test {
static base::CommandLine OpenCommand() {
base::FilePath open_command_path(kTestOpenCommand);
- return base::CommandLine(open_command_path);
+ base::CommandLine open_command(open_command_path);
+ // The "%1" should automatically be quoted.
+ open_command.AppendArg("%1");
+ return open_command;
}
static std::set<base::string16> FileExtensions() {
@@ -868,7 +871,7 @@ TEST_F(ShellUtilRegistryTest, AddFileAssociations) {
L"Software\\Classes\\TestApp\\shell\\open\\command",
KEY_READ));
EXPECT_EQ(ERROR_SUCCESS, key.ReadValue(L"", &value));
- EXPECT_EQ(L"\"C:\\test.exe\"", value);
+ EXPECT_EQ(L"\"C:\\test.exe\" \"%1\"", value);
// .test1 should be default-associated with our test app.
ASSERT_EQ(
« no previous file with comments | « chrome/installer/util/shell_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698