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

Side by Side Diff: chrome/common/switch_utils_unittest.cc

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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/common/switch_utils.cc ('k') | chrome/common/tts_utterance_request.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/common/switch_utils.h" 5 #include "chrome/common/switch_utils.h"
6 6
7 #include "base/basictypes.h"
8 #include "base/command_line.h" 7 #include "base/command_line.h"
9 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/macros.h"
10 #include "build/build_config.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 TEST(SwitchUtilsTest, RemoveSwitches) { 13 TEST(SwitchUtilsTest, RemoveSwitches) {
13 const base::CommandLine::CharType* argv[] = { 14 const base::CommandLine::CharType* argv[] = {
14 FILE_PATH_LITERAL("program"), 15 FILE_PATH_LITERAL("program"),
15 FILE_PATH_LITERAL("--app=http://www.google.com/"), 16 FILE_PATH_LITERAL("--app=http://www.google.com/"),
16 FILE_PATH_LITERAL("--force-first-run"), 17 FILE_PATH_LITERAL("--force-first-run"),
17 FILE_PATH_LITERAL("--make-default-browser"), 18 FILE_PATH_LITERAL("--make-default-browser"),
18 FILE_PATH_LITERAL("--foo"), 19 FILE_PATH_LITERAL("--foo"),
19 FILE_PATH_LITERAL("--bar")}; 20 FILE_PATH_LITERAL("--bar")};
(...skipping 26 matching lines...) Expand all
46 std::map<std::string, base::CommandLine::StringType> switches = 47 std::map<std::string, base::CommandLine::StringType> switches =
47 cmd_line.GetSwitches(); 48 cmd_line.GetSwitches();
48 EXPECT_EQ(5U, switches.size()); 49 EXPECT_EQ(5U, switches.size());
49 50
50 switches::RemoveSwitchesForAutostart(&switches); 51 switches::RemoveSwitchesForAutostart(&switches);
51 EXPECT_EQ(2U, switches.size()); 52 EXPECT_EQ(2U, switches.size());
52 EXPECT_TRUE(cmd_line.HasSwitch("foo")); 53 EXPECT_TRUE(cmd_line.HasSwitch("foo"));
53 EXPECT_TRUE(cmd_line.HasSwitch("bar")); 54 EXPECT_TRUE(cmd_line.HasSwitch("bar"));
54 } 55 }
55 #endif 56 #endif
OLDNEW
« no previous file with comments | « chrome/common/switch_utils.cc ('k') | chrome/common/tts_utterance_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698