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

Side by Side Diff: base/command_line_unittest.cc

Issue 15735027: Use a direct include of utf_string_conversions.h in android_webview/, apps/, ash/, base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « base/command_line.cc ('k') | base/debug/trace_event_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 using base::FilePath; 14 using base::FilePath;
15 15
16 // To test Windows quoting behavior, we use a string that has some backslashes 16 // To test Windows quoting behavior, we use a string that has some backslashes
17 // and quotes. 17 // and quotes.
18 // Consider the command-line argument: q\"bs1\bs2\\bs3q\\\" 18 // Consider the command-line argument: q\"bs1\bs2\\bs3q\\\"
19 // Here it is with C-style escapes. 19 // Here it is with C-style escapes.
20 static const CommandLine::StringType kTrickyQuoted = 20 static const CommandLine::StringType kTrickyQuoted =
21 FILE_PATH_LITERAL("q\\\"bs1\\bs2\\\\bs3q\\\\\\\""); 21 FILE_PATH_LITERAL("q\\\"bs1\\bs2\\\\bs3q\\\\\\\"");
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 } 351 }
352 #endif 352 #endif
353 353
354 // Calling Init multiple times should not modify the previous CommandLine. 354 // Calling Init multiple times should not modify the previous CommandLine.
355 TEST(CommandLineTest, Init) { 355 TEST(CommandLineTest, Init) {
356 CommandLine* initial = CommandLine::ForCurrentProcess(); 356 CommandLine* initial = CommandLine::ForCurrentProcess();
357 EXPECT_FALSE(CommandLine::Init(0, NULL)); 357 EXPECT_FALSE(CommandLine::Init(0, NULL));
358 CommandLine* current = CommandLine::ForCurrentProcess(); 358 CommandLine* current = CommandLine::ForCurrentProcess();
359 EXPECT_EQ(initial, current); 359 EXPECT_EQ(initial, current);
360 } 360 }
OLDNEW
« no previous file with comments | « base/command_line.cc ('k') | base/debug/trace_event_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698