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

Side by Side Diff: ios/web/test/web_test_suite.cc

Issue 1972903003: [ios] Register test web schemes in WebTestSuite. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comments to |web_client_|. Created 4 years, 7 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 | « ios/web/test/web_test_suite.h ('k') | ios/web/test/web_test_suite.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ios/web/test/web_test_suite.h"
6
7 #include "base/macros.h"
8 #include "base/metrics/statistics_recorder.h"
9 #include "ios/web/web_thread_impl.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11
12 namespace web {
13
14 class WebTestSuiteListener : public testing::EmptyTestEventListener {
15 public:
16 WebTestSuiteListener() {}
17 void OnTestEnd(const testing::TestInfo& test_info) override {
18 WebThreadImpl::FlushThreadPoolHelperForTesting();
19 }
20
21 private:
22 DISALLOW_COPY_AND_ASSIGN(WebTestSuiteListener);
23 };
24
25 WebTestSuite::WebTestSuite(int argc, char** argv)
26 : base::TestSuite(argc, argv) {
27 }
28
29 WebTestSuite::~WebTestSuite() {
30 }
31
32 void WebTestSuite::Initialize() {
33 base::TestSuite::Initialize();
34
35 // Initialize the histograms subsystem, so that any histograms hit in tests
36 // are correctly registered with the statistics recorder and can be queried
37 // by tests.
38 base::StatisticsRecorder::Initialize();
39
40 testing::UnitTest::GetInstance()->listeners().Append(
41 new WebTestSuiteListener);
42 }
43
44 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/test/web_test_suite.h ('k') | ios/web/test/web_test_suite.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698