diff options
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/reliability/run_all_unittests.cc | 5 | ||||
-rw-r--r-- | chrome/test/ui/run_all_unittests.cc | 5 | ||||
-rw-r--r-- | chrome/test/unit/run_all_unittests.cc | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/chrome/test/reliability/run_all_unittests.cc b/chrome/test/reliability/run_all_unittests.cc index a5d3da3..cfe0a29 100644 --- a/chrome/test/reliability/run_all_unittests.cc +++ b/chrome/test/reliability/run_all_unittests.cc @@ -27,8 +27,13 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#include "base/at_exit.h" #include "chrome/test/reliability/reliability_test_suite.h" int main(int argc, char **argv) { + // Some tests may use base::Singleton<>, thus we need to instanciate + // the AtExitManager or else we will leak objects. + base::AtExitManager at_exit_manager; + return ReliabilityTestSuite(argc, argv).Run(); } diff --git a/chrome/test/ui/run_all_unittests.cc b/chrome/test/ui/run_all_unittests.cc index 737a7be..8d1307772 100644 --- a/chrome/test/ui/run_all_unittests.cc +++ b/chrome/test/ui/run_all_unittests.cc @@ -27,9 +27,14 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#include "base/at_exit.h" #include "chrome/test/ui/ui_test_suite.h" int main(int argc, char **argv) { + // Some tests may use base::Singleton<>, thus we need to instanciate + // the AtExitManager or else we will leak objects. + base::AtExitManager at_exit_manager; + Thread::SetThreadName("Tests_Main", GetCurrentThreadId()); return UITestSuite(argc, argv).Run(); } diff --git a/chrome/test/unit/run_all_unittests.cc b/chrome/test/unit/run_all_unittests.cc index f8d6fea..f52bd78 100644 --- a/chrome/test/unit/run_all_unittests.cc +++ b/chrome/test/unit/run_all_unittests.cc @@ -27,8 +27,13 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#include "base/at_exit.h" #include "chrome/test/unit/chrome_test_suite.h" int main(int argc, char **argv) { + // Some tests may use base::Singleton<>, thus we need to instanciate + // the AtExitManager or else we will leak objects. + base::AtExitManager at_exit_manager; + return ChromeTestSuite(argc, argv).Run(); } |