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

Side by Side Diff: base/test/test_suite.cc

Issue 1094903006: Update {virtual,override} to follow C++11 style in base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « base/test/gtest_xml_util.h ('k') | base/threading/thread_perftest.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/test/test_suite.h" 5 #include "base/test/test_suite.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #endif 48 #endif
49 49
50 #if defined(OS_IOS) 50 #if defined(OS_IOS)
51 #include "base/test/test_support_ios.h" 51 #include "base/test/test_support_ios.h"
52 #endif 52 #endif
53 53
54 namespace { 54 namespace {
55 55
56 class MaybeTestDisabler : public testing::EmptyTestEventListener { 56 class MaybeTestDisabler : public testing::EmptyTestEventListener {
57 public: 57 public:
58 virtual void OnTestStart(const testing::TestInfo& test_info) override { 58 void OnTestStart(const testing::TestInfo& test_info) override {
59 ASSERT_FALSE(TestSuite::IsMarkedMaybe(test_info)) 59 ASSERT_FALSE(TestSuite::IsMarkedMaybe(test_info))
60 << "Probably the OS #ifdefs don't include all of the necessary " 60 << "Probably the OS #ifdefs don't include all of the necessary "
61 "platforms.\nPlease ensure that no tests have the MAYBE_ prefix " 61 "platforms.\nPlease ensure that no tests have the MAYBE_ prefix "
62 "after the code is preprocessed."; 62 "after the code is preprocessed.";
63 } 63 }
64 }; 64 };
65 65
66 class TestClientInitializer : public testing::EmptyTestEventListener { 66 class TestClientInitializer : public testing::EmptyTestEventListener {
67 public: 67 public:
68 TestClientInitializer() 68 TestClientInitializer()
69 : old_command_line_(base::CommandLine::NO_PROGRAM) { 69 : old_command_line_(base::CommandLine::NO_PROGRAM) {
70 } 70 }
71 71
72 virtual void OnTestStart(const testing::TestInfo& test_info) override { 72 void OnTestStart(const testing::TestInfo& test_info) override {
73 old_command_line_ = *base::CommandLine::ForCurrentProcess(); 73 old_command_line_ = *base::CommandLine::ForCurrentProcess();
74 } 74 }
75 75
76 virtual void OnTestEnd(const testing::TestInfo& test_info) override { 76 void OnTestEnd(const testing::TestInfo& test_info) override {
77 *base::CommandLine::ForCurrentProcess() = old_command_line_; 77 *base::CommandLine::ForCurrentProcess() = old_command_line_;
78 } 78 }
79 79
80 private: 80 private:
81 base::CommandLine old_command_line_; 81 base::CommandLine old_command_line_;
82 82
83 DISALLOW_COPY_AND_ASSIGN(TestClientInitializer); 83 DISALLOW_COPY_AND_ASSIGN(TestClientInitializer);
84 }; 84 };
85 85
86 } // namespace 86 } // namespace
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 ResetCommandLine(); 350 ResetCommandLine();
351 AddTestLauncherResultPrinter(); 351 AddTestLauncherResultPrinter();
352 352
353 TestTimeouts::Initialize(); 353 TestTimeouts::Initialize();
354 354
355 trace_to_file_.BeginTracingFromCommandLineOptions(); 355 trace_to_file_.BeginTracingFromCommandLineOptions();
356 } 356 }
357 357
358 void TestSuite::Shutdown() { 358 void TestSuite::Shutdown() {
359 } 359 }
OLDNEW
« no previous file with comments | « base/test/gtest_xml_util.h ('k') | base/threading/thread_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698