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

Unified Diff: ios/web/test/web_test_suite.cc

Issue 1406983008: [iOS] ios/web no longer depends on content::BrowserThread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 | « ios/web/test/test_web_thread_bundle_adapter.cc ('k') | ios/web/web_thread_adapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/test/web_test_suite.cc
diff --git a/ios/web/test/web_test_suite.cc b/ios/web/test/web_test_suite.cc
index cc218e9cc26d4791dfd4dcc761280c78ce86fb0e..ec72565024b87a8d2dc14b450f73acb198b1fbea 100644
--- a/ios/web/test/web_test_suite.cc
+++ b/ios/web/test/web_test_suite.cc
@@ -4,10 +4,24 @@
#include "ios/web/test/web_test_suite.h"
+#include "base/macros.h"
#include "base/metrics/statistics_recorder.h"
+#include "ios/web/web_thread_impl.h"
+#include "testing/gtest/include/gtest/gtest.h"
namespace web {
+class WebTestSuiteListener : public testing::EmptyTestEventListener {
+ public:
+ WebTestSuiteListener() {}
+ void OnTestEnd(const testing::TestInfo& test_info) override {
+ WebThreadImpl::FlushThreadPoolHelperForTesting();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WebTestSuiteListener);
+};
+
WebTestSuite::WebTestSuite(int argc, char** argv)
: base::TestSuite(argc, argv) {
}
@@ -22,6 +36,9 @@ void WebTestSuite::Initialize() {
// are correctly registered with the statistics recorder and can be queried
// by tests.
base::StatisticsRecorder::Initialize();
+
+ testing::UnitTest::GetInstance()->listeners().Append(
+ new WebTestSuiteListener);
}
} // namespace web
« no previous file with comments | « ios/web/test/test_web_thread_bundle_adapter.cc ('k') | ios/web/web_thread_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698