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

Unified Diff: base/test/test_suite.cc

Issue 645133002: Prefix CommandLine usege with base namespace (Part 1: base/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated #2 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
Index: base/test/test_suite.cc
diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc
index 23ffa1ebe96a186e230ef03dec8455e2f46a1a25..ddd1c0e64a5035ec9a0c621da4b6ebf733c26c1f 100644
--- a/base/test/test_suite.cc
+++ b/base/test/test_suite.cc
@@ -60,19 +60,19 @@ class MaybeTestDisabler : public testing::EmptyTestEventListener {
class TestClientInitializer : public testing::EmptyTestEventListener {
public:
TestClientInitializer()
- : old_command_line_(CommandLine::NO_PROGRAM) {
+ : old_command_line_(base::CommandLine::NO_PROGRAM) {
}
virtual void OnTestStart(const testing::TestInfo& test_info) override {
- old_command_line_ = *CommandLine::ForCurrentProcess();
+ old_command_line_ = *base::CommandLine::ForCurrentProcess();
}
virtual void OnTestEnd(const testing::TestInfo& test_info) override {
- *CommandLine::ForCurrentProcess() = old_command_line_;
+ *base::CommandLine::ForCurrentProcess() = old_command_line_;
}
private:
- CommandLine old_command_line_;
+ base::CommandLine old_command_line_;
DISALLOW_COPY_AND_ASSIGN(TestClientInitializer);
};
@@ -110,11 +110,11 @@ TestSuite::TestSuite(int argc, char** argv, bool create_at_exit_manager)
TestSuite::~TestSuite() {
if (initialized_command_line_)
- CommandLine::Reset();
+ base::CommandLine::Reset();
}
void TestSuite::InitializeFromCommandLine(int argc, char** argv) {
- initialized_command_line_ = CommandLine::Init(argc, argv);
+ initialized_command_line_ = base::CommandLine::Init(argc, argv);
testing::InitGoogleTest(&argc, argv);
testing::InitGoogleMock(&argc, argv);
@@ -126,7 +126,7 @@ void TestSuite::InitializeFromCommandLine(int argc, char** argv) {
#if defined(OS_WIN)
void TestSuite::InitializeFromCommandLine(int argc, wchar_t** argv) {
// Windows CommandLine::Init ignores argv anyway.
- initialized_command_line_ = CommandLine::Init(argc, NULL);
+ initialized_command_line_ = base::CommandLine::Init(argc, NULL);
testing::InitGoogleTest(&argc, argv);
testing::InitGoogleMock(&argc, argv);
}
@@ -176,13 +176,13 @@ void TestSuite::ResetCommandLine() {
#if !defined(OS_IOS)
void TestSuite::AddTestLauncherResultPrinter() {
// Only add the custom printer if requested.
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kTestLauncherOutput)) {
return;
}
- FilePath output_path(CommandLine::ForCurrentProcess()->GetSwitchValuePath(
- switches::kTestLauncherOutput));
+ FilePath output_path(base::CommandLine::ForCurrentProcess()->
+ GetSwitchValuePath(switches::kTestLauncherOutput));
// Do not add the result printer if output path already exists. It's an
// indicator there is a process printing to that file, and we're likely
@@ -214,7 +214,7 @@ int TestSuite::Run() {
Initialize();
std::string client_func =
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kTestChildProcess);
// Check to see if we are being run as a client process.
@@ -322,7 +322,8 @@ void TestSuite::Initialize() {
// In some cases, we do not want to see standard error dialogs.
if (!base::debug::BeingDebugged() &&
- !CommandLine::ForCurrentProcess()->HasSwitch("show-error-dialogs")) {
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ "show-error-dialogs")) {
SuppressErrorDialogs();
base::debug::SetSuppressDebugUI(true);
logging::SetLogAssertHandler(UnitTestAssertHandler);

Powered by Google App Engine
This is Rietveld 408576698