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

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

Issue 6086003: Cleanup: Remove unneeded includes of chrome_switches.h. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/chrome_switches.h"
9 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
10 9
11 TEST(SwitchUtilsTest, RemoveSwitches) { 10 TEST(SwitchUtilsTest, RemoveSwitches) {
12 #if defined(OS_WIN) 11 #if defined(OS_WIN)
13 // All these command line args (except foo and bar) will 12 // All these command line args (except foo and bar) will
14 // be removed after RemoveSwitchesForAutostart: 13 // be removed after RemoveSwitchesForAutostart:
15 CommandLine cmd_line = CommandLine::FromString( 14 CommandLine cmd_line = CommandLine::FromString(
16 L"program" 15 L"program"
17 L" --app=http://www.google.com/" 16 L" --app=http://www.google.com/"
18 L" --first-run" 17 L" --first-run"
(...skipping 18 matching lines...) Expand all
37 36
38 std::map<std::string, CommandLine::StringType> switches = 37 std::map<std::string, CommandLine::StringType> switches =
39 cmd_line.GetSwitches(); 38 cmd_line.GetSwitches();
40 EXPECT_EQ(7U, switches.size()); 39 EXPECT_EQ(7U, switches.size());
41 40
42 switches::RemoveSwitchesForAutostart(&switches); 41 switches::RemoveSwitchesForAutostart(&switches);
43 EXPECT_EQ(2U, switches.size()); 42 EXPECT_EQ(2U, switches.size());
44 EXPECT_TRUE(cmd_line.HasSwitch("foo")); 43 EXPECT_TRUE(cmd_line.HasSwitch("foo"));
45 EXPECT_TRUE(cmd_line.HasSwitch("bar")); 44 EXPECT_TRUE(cmd_line.HasSwitch("bar"));
46 } 45 }
OLDNEW
« no previous file with comments | « chrome/common/sandbox_init_wrapper_linux.cc ('k') | chrome/installer/util/browser_distribution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698