| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef IOS_WEB_TEST_WEB_TEST_SUITE_H_ | 5 #ifndef IOS_WEB_TEST_WEB_TEST_SUITE_H_ |
| 6 #define IOS_WEB_TEST_WEB_TEST_SUITE_H_ | 6 #define IOS_WEB_TEST_WEB_TEST_SUITE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/test/test_suite.h" | 9 #include "base/test/test_suite.h" |
| 10 #include "ios/web/public/test/scoped_testing_web_client.h" |
| 10 | 11 |
| 11 namespace web { | 12 namespace web { |
| 12 | 13 |
| 13 class WebTestSuite : public base::TestSuite { | 14 class WebTestSuite : public base::TestSuite { |
| 14 public: | 15 public: |
| 15 WebTestSuite(int argc, char** argv); | 16 WebTestSuite(int argc, char** argv); |
| 16 ~WebTestSuite() override; | 17 ~WebTestSuite() override; |
| 17 | 18 |
| 18 protected: | 19 protected: |
| 19 void Initialize() override; | 20 void Initialize() override; |
| 20 | 21 |
| 21 private: | 22 private: |
| 23 // Sets web client on construction and restores the original on destruction. |
| 24 ScopedTestingWebClient web_client_; |
| 22 | 25 |
| 23 DISALLOW_COPY_AND_ASSIGN(WebTestSuite); | 26 DISALLOW_COPY_AND_ASSIGN(WebTestSuite); |
| 24 }; | 27 }; |
| 25 | 28 |
| 26 } // namespace web | 29 } // namespace web |
| 27 | 30 |
| 28 #endif // IOS_WEB_TEST_WEB_TEST_SUITE_H_ | 31 #endif // IOS_WEB_TEST_WEB_TEST_SUITE_H_ |
| OLD | NEW |