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

Unified Diff: base/test/test_suite.cc

Issue 2513363003: repro for crbug.com/663886
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « base/test/test_suite.h ('k') | base/tuple.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_suite.cc
diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc
index a56dc59fecceff86f96180938be3049414e62c32..b136c2a315367d0876db0ce1ae1b819e4b09a44b 100644
--- a/base/test/test_suite.cc
+++ b/base/test/test_suite.cc
@@ -33,7 +33,7 @@
#include "base/test/test_timeouts.h"
#include "base/time/time.h"
#include "build/build_config.h"
-#include "testing/gmock/include/gmock/gmock.h"
+//#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/multiprocess_func_list.h"
@@ -48,7 +48,7 @@
#include "base/i18n/rtl.h"
#if !defined(OS_IOS)
#include "base/strings/string_util.h"
-#include "third_party/icu/source/common/unicode/uloc.h"
+//#include "third_party/icu/source/common/unicode/uloc.h"
#endif
#endif
@@ -98,11 +98,11 @@ std::string GetProfileName() {
static const char kDefaultProfileName[] = "test-profile-{pid}";
CR_DEFINE_STATIC_LOCAL(std::string, profile_name, ());
if (profile_name.empty()) {
- const base::CommandLine& command_line =
- *base::CommandLine::ForCurrentProcess();
- if (command_line.HasSwitch(switches::kProfilingFile))
- profile_name = command_line.GetSwitchValueASCII(switches::kProfilingFile);
- else
+ //const base::CommandLine& command_line =
+ //*base::CommandLine::ForCurrentProcess();
+ //if (command_line.HasSwitch(switches::kProfilingFile))
+ //profile_name = command_line.GetSwitchValueASCII(switches::kProfilingFile);
+ //else
profile_name = std::string(kDefaultProfileName);
}
return profile_name;
@@ -138,7 +138,7 @@ TestSuite::~TestSuite() {
void TestSuite::InitializeFromCommandLine(int argc, char** argv) {
initialized_command_line_ = CommandLine::Init(argc, argv);
testing::InitGoogleTest(&argc, argv);
- testing::InitGoogleMock(&argc, argv);
+ //testing::InitGoogleMock(&argc, argv);
#if defined(OS_IOS)
InitIOSRunHook(this, argc, argv);
@@ -150,7 +150,7 @@ void TestSuite::InitializeFromCommandLine(int argc, wchar_t** argv) {
// Windows CommandLine::Init ignores argv anyway.
initialized_command_line_ = CommandLine::Init(argc, NULL);
testing::InitGoogleTest(&argc, argv);
- testing::InitGoogleMock(&argc, argv);
+ //testing::InitGoogleMock(&argc, argv);
}
#endif // defined(OS_WIN)
@@ -213,11 +213,11 @@ void TestSuite::AddTestLauncherResultPrinter() {
return;
}
- XmlUnitTestResultPrinter* printer = new XmlUnitTestResultPrinter;
- CHECK(printer->Initialize(output_path));
- testing::TestEventListeners& listeners =
- testing::UnitTest::GetInstance()->listeners();
- listeners.Append(printer);
+ //XmlUnitTestResultPrinter* printer = new XmlUnitTestResultPrinter;
+ //CHECK(printer->Initialize(output_path));
+ //testing::TestEventListeners& listeners =
+ //testing::UnitTest::GetInstance()->listeners();
+ //listeners.Append(printer);
}
// Don't add additional code to this method. Instead add it to
@@ -232,13 +232,13 @@ int TestSuite::Run() {
#endif
Initialize();
- std::string client_func =
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kTestChildProcess);
+ //std::string client_func =
+ //CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ //switches::kTestChildProcess);
// Check to see if we are being run as a client process.
- if (!client_func.empty())
- return multi_process_function_list::InvokeChildProcessTest(client_func);
+ //if (!client_func.empty())
+ //return multi_process_function_list::InvokeChildProcessTest(client_func);
#if defined(OS_IOS)
test_listener_ios::RegisterTestEndListener();
#endif
@@ -301,9 +301,9 @@ void TestSuite::SuppressErrorDialogs() {
void TestSuite::Initialize() {
#if !defined(OS_IOS)
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWaitForDebugger)) {
- debug::WaitForDebugger(60, true);
- }
+ //if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWaitForDebugger)) {
+ //debug::WaitForDebugger(60, true);
+ //}
#endif
// Set up a FeatureList instance, so that code using that API will not hit a
@@ -350,7 +350,7 @@ void TestSuite::Initialize() {
logging::SetLogAssertHandler(UnitTestAssertHandler);
}
- base::test::InitializeICUForTesting();
+ //base::test::InitializeICUForTesting();
// On the Mac OS X command line, the default locale is *_POSIX. In Chromium,
// the locale is set via an OS X locale API and is never *_POSIX.
@@ -361,11 +361,11 @@ void TestSuite::Initialize() {
// TODO(jshin): Should we set the locale via an OS X locale API here?
#if !defined(OS_WIN)
#if defined(OS_IOS)
- i18n::SetICUDefaultLocale("en_US");
+ //i18n::SetICUDefaultLocale("en_US");
#else
- std::string default_locale(uloc_getDefault());
- if (EndsWith(default_locale, "POSIX", CompareCase::INSENSITIVE_ASCII))
- i18n::SetICUDefaultLocale("en_US");
+ //std::string default_locale(uloc_getDefault());
+ //if (EndsWith(default_locale, "POSIX", CompareCase::INSENSITIVE_ASCII))
+ //i18n::SetICUDefaultLocale("en_US");
#endif
#endif
@@ -375,7 +375,7 @@ void TestSuite::Initialize() {
TestTimeouts::Initialize();
- trace_to_file_.BeginTracingFromCommandLineOptions();
+ //trace_to_file_.BeginTracingFromCommandLineOptions();
base::debug::StartProfiling(GetProfileName());
}
« no previous file with comments | « base/test/test_suite.h ('k') | base/tuple.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698