| Index: content/public/test/content_test_suite_base.cc
|
| ===================================================================
|
| --- content/public/test/content_test_suite_base.cc (revision 174239)
|
| +++ content/public/test/content_test_suite_base.cc (working copy)
|
| @@ -8,15 +8,30 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/test/test_suite.h"
|
| +#include "base/threading/sequenced_worker_pool.h"
|
| +#include "content/browser/browser_thread_impl.h"
|
| #include "content/common/url_schemes.h"
|
| #include "content/public/common/content_client.h"
|
| #include "content/public/common/content_paths.h"
|
| #include "media/base/media.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| #include "ui/base/ui_base_paths.h"
|
| #include "ui/compositor/compositor_setup.h"
|
|
|
| namespace content {
|
|
|
| +namespace {
|
| +class ContentTestSuiteListener : public testing::EmptyTestEventListener {
|
| + public:
|
| + ContentTestSuiteListener() {
|
| + }
|
| + virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE {
|
| + BrowserThreadImpl::FlushThreadPoolForTesting();
|
| + }
|
| + DISALLOW_COPY_AND_ASSIGN(ContentTestSuiteListener);
|
| +};
|
| +} // namespace
|
| +
|
| ContentTestSuiteBase::ContentTestSuiteBase(int argc, char** argv)
|
| : base::TestSuite(argc, argv),
|
| external_libraries_enabled_(true) {
|
| @@ -38,6 +53,10 @@
|
|
|
| // Mock out the compositor on platforms that use it.
|
| ui::SetupTestCompositor();
|
| +
|
| + testing::TestEventListeners& listeners =
|
| + testing::UnitTest::GetInstance()->listeners();
|
| + listeners.Append(new ContentTestSuiteListener);
|
| }
|
|
|
| } // namespace content
|
|
|