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

Side by Side Diff: chrome/installer/mini_installer/mini_installer_unittest.cc

Issue 2655473002: Handle spaces in the name of the mini_installer. (Closed)
Patch Set: better comments Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « chrome/installer/mini_installer/mini_installer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/installer/mini_installer/mini_installer.h"
6
7 #include "chrome/installer/mini_installer/configuration.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace mini_installer {
11
12 TEST(MiniInstallerTest, AppendCommandLineFlags) {
13 static constexpr struct {
14 const wchar_t* command_line;
15 const wchar_t* args;
16 } kData[] = {
17 {L"", L"foo.exe"},
18 {L"mini_installer.exe", L"foo.exe"},
19 {L"mini_installer.exe --verbose-logging", L"foo.exe --verbose-logging"},
20 {L"C:\\Temp\\mini_installer.exe --verbose-logging",
21 L"foo.exe --verbose-logging"},
22 {L"C:\\Temp\\mini_installer --verbose-logging",
23 L"foo.exe --verbose-logging"},
24 {L"\"C:\\Temp\\mini_installer (1).exe\" --verbose-logging",
25 L"foo.exe --verbose-logging"},
26 {L"\"mini_installer.exe\"--verbose-logging",
27 L"foo.exe --verbose-logging"},
28 };
29
30 CommandString buffer;
31
32 for (const auto& data : kData) {
33 buffer.assign(L"foo.exe");
34 AppendCommandLineFlags(data.command_line, &buffer);
35 EXPECT_STREQ(data.args, buffer.get()) << data.command_line;
36 }
37 }
38
39 } // namespace mini_installer
OLDNEW
« no previous file with comments | « chrome/installer/mini_installer/mini_installer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698