diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-25 02:49:38 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-25 02:49:38 +0000 |
commit | c4340bc0a16df37171acbd99738aa49e3f35cc64 (patch) | |
tree | 0632db925ce6709ff6d957dda9779d60c3bdfe4e /base/test | |
parent | f50e9b22e51619f22d33bef0a591f6c4a50559aa (diff) | |
download | chromium_src-c4340bc0a16df37171acbd99738aa49e3f35cc64.zip chromium_src-c4340bc0a16df37171acbd99738aa49e3f35cc64.tar.gz chromium_src-c4340bc0a16df37171acbd99738aa49e3f35cc64.tar.bz2 |
Convert the session restore ui_tests to browser_tests. I renabled the disabled tests; hopefully they're now more flaky.
I found a simple way of launching a browser_test binary as a regular chrome binary which is needed for the app test case. This means I can undo r133560 which I've done here.
BUG=121574,29110,52022
Review URL: https://chromiumcodereview.appspot.com/10202005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133852 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/test')
-rw-r--r-- | base/test/test_suite.cc | 32 | ||||
-rw-r--r-- | base/test/test_suite.h | 3 |
2 files changed, 11 insertions, 24 deletions
diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc index dba5063..75e9ff5 100644 --- a/base/test/test_suite.cc +++ b/base/test/test_suite.cc @@ -70,7 +70,6 @@ class TestClientInitializer : public testing::EmptyTestEventListener { } // namespace const char TestSuite::kStrictFailureHandling[] = "strict_failure_handling"; -const char TestSuite::kSilent[] = "silent"; TestSuite::TestSuite(int argc, char** argv) : initialized_command_line_(false) { PreInitialize(argc, argv, true); @@ -178,13 +177,6 @@ int TestSuite::Run() { CommandLine::ForCurrentProcess()->GetSwitchValueASCII( switches::kTestChildProcess); - bool silent = CommandLine::ForCurrentProcess()->HasSwitch(kSilent); - if (silent) { - testing::TestEventListeners& listeners = - testing::UnitTest::GetInstance()->listeners(); - delete listeners.Release(listeners.default_result_printer()); - } - // Check to see if we are being run as a client process. if (!client_func.empty()) return multi_process_function_list::InvokeChildProcessTest(client_func); @@ -194,20 +186,18 @@ int TestSuite::Run() { if (result != 0 && GetTestCount(&TestSuite::NonIgnoredFailures) == 0) result = 0; - if (!silent) { - // Display the number of flaky tests. - int flaky_count = GetTestCount(&TestSuite::IsMarkedFlaky); - if (flaky_count) { - printf(" YOU HAVE %d FLAKY %s\n\n", flaky_count, - flaky_count == 1 ? "TEST" : "TESTS"); - } + // Display the number of flaky tests. + int flaky_count = GetTestCount(&TestSuite::IsMarkedFlaky); + if (flaky_count) { + printf(" YOU HAVE %d FLAKY %s\n\n", flaky_count, + flaky_count == 1 ? "TEST" : "TESTS"); + } - // Display the number of tests with ignored failures (FAILS). - int failing_count = GetTestCount(&TestSuite::IsMarkedFailing); - if (failing_count) { - printf(" YOU HAVE %d %s with ignored failures (FAILS prefix)\n\n", - failing_count, failing_count == 1 ? "test" : "tests"); - } + // Display the number of tests with ignored failures (FAILS). + int failing_count = GetTestCount(&TestSuite::IsMarkedFailing); + if (failing_count) { + printf(" YOU HAVE %d %s with ignored failures (FAILS prefix)\n\n", + failing_count, failing_count == 1 ? "test" : "tests"); } #if defined(OS_MACOSX) diff --git a/base/test/test_suite.h b/base/test/test_suite.h index 889e55f..2b0e9ce 100644 --- a/base/test/test_suite.h +++ b/base/test/test_suite.h @@ -59,9 +59,6 @@ class TestSuite { // process exit code. static const char kStrictFailureHandling[]; - // A command-line flag that silences all gtest output. - static const char kSilent[]; - protected: // This constructor is only accessible to specialized test suite // implementations which need to control the creation of an AtExitManager |