OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_CHROME_BROWSER_TEST_PERF_TEST_WITH_BVC_IOS_H_ | 5 #ifndef IOS_CHROME_BROWSER_TEST_PERF_TEST_WITH_BVC_IOS_H_ |
6 #define IOS_CHROME_BROWSER_TEST_PERF_TEST_WITH_BVC_IOS_H_ | 6 #define IOS_CHROME_BROWSER_TEST_PERF_TEST_WITH_BVC_IOS_H_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/mac/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
13 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h" | 13 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h" |
14 #include "ios/chrome/test/base/perf_test_ios.h" | 14 #include "ios/chrome/test/base/perf_test_ios.h" |
15 #include "ios/chrome/test/ios_chrome_scoped_testing_chrome_browser_provider.h" | 15 #include "ios/chrome/test/ios_chrome_scoped_testing_chrome_browser_provider.h" |
16 #include "ios/chrome/test/ios_chrome_scoped_testing_local_state.h" | 16 #include "ios/chrome/test/ios_chrome_scoped_testing_chrome_browser_state_manager
.h" |
17 #include "ios/web/public/test/scoped_testing_web_client.h" | 17 #include "ios/web/public/test/scoped_testing_web_client.h" |
18 | 18 |
19 @class BrowserViewController; | 19 @class BrowserViewController; |
20 @class BrowserViewControllerDependencyFactory; | 20 @class BrowserViewControllerDependencyFactory; |
21 @class TabModel; | 21 @class TabModel; |
22 | 22 |
23 // Base class for performance tests that require a browser view controller. | 23 // Base class for performance tests that require a browser view controller. |
24 // The BVC requires a non-trivial amount of setup and teardown, so it's best | 24 // The BVC requires a non-trivial amount of setup and teardown, so it's best |
25 // to derive from this class for tests that require a real BVC. | 25 // to derive from this class for tests that require a real BVC. |
26 // The class disables prerendering, for better performance numbers. | 26 // The class disables prerendering, for better performance numbers. |
(...skipping 13 matching lines...) Expand all Loading... |
40 | 40 |
41 void SetUp() override; | 41 void SetUp() override; |
42 void TearDown() override; | 42 void TearDown() override; |
43 | 43 |
44 protected: | 44 protected: |
45 // True if the test needs extra time for Teardown. | 45 // True if the test needs extra time for Teardown. |
46 bool slow_teardown_; | 46 bool slow_teardown_; |
47 | 47 |
48 web::ScopedTestingWebClient web_client_; | 48 web::ScopedTestingWebClient web_client_; |
49 IOSChromeScopedTestingChromeBrowserProvider provider_; | 49 IOSChromeScopedTestingChromeBrowserProvider provider_; |
50 IOSChromeScopedTestingLocalState local_state_; | 50 IOSChromeScopedTestingChromeBrowserStateManager browser_state_manager_; |
51 | 51 |
52 std::unique_ptr<TestChromeBrowserState> chrome_browser_state_; | 52 std::unique_ptr<TestChromeBrowserState> chrome_browser_state_; |
53 std::unique_ptr<TestChromeBrowserState> incognito_chrome_browser_state_; | 53 std::unique_ptr<TestChromeBrowserState> incognito_chrome_browser_state_; |
54 | 54 |
55 base::scoped_nsobject<TabModel> tab_model_; | 55 base::scoped_nsobject<TabModel> tab_model_; |
56 base::scoped_nsobject<TabModel> otr_tab_model_; | 56 base::scoped_nsobject<TabModel> otr_tab_model_; |
57 | 57 |
58 base::scoped_nsobject<BrowserViewControllerDependencyFactory> bvc_factory_; | 58 base::scoped_nsobject<BrowserViewControllerDependencyFactory> bvc_factory_; |
59 base::scoped_nsobject<BrowserViewController> bvc_; | 59 base::scoped_nsobject<BrowserViewController> bvc_; |
60 base::scoped_nsobject<UIWindow> window_; | 60 base::scoped_nsobject<UIWindow> window_; |
61 }; | 61 }; |
62 | 62 |
63 #endif // IOS_CHROME_BROWSER_TEST_PERF_TEST_WITH_BVC_IOS_H_ | 63 #endif // IOS_CHROME_BROWSER_TEST_PERF_TEST_WITH_BVC_IOS_H_ |
OLD | NEW |