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

Side by Side Diff: ios/chrome/browser/test/perf_test_with_bvc_ios.h

Issue 2585233003: Upstream Chrome on iOS source code [2/11]. (Closed)
Patch Set: Created 3 years, 12 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_TEST_PERF_TEST_WITH_BVC_IOS_H_
6 #define IOS_CHROME_BROWSER_TEST_PERF_TEST_WITH_BVC_IOS_H_
7
8 #import <UIKit/UIKit.h>
9
10 #include <memory>
11
12 #include "base/mac/scoped_nsobject.h"
13 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h"
14 #include "ios/chrome/test/base/perf_test_ios.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"
17 #include "ios/web/public/test/scoped_testing_web_client.h"
18
19 @class BrowserViewController;
20 @class BrowserViewControllerDependencyFactory;
21 @class TabModel;
22
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
25 // to derive from this class for tests that require a real BVC.
26 // The class disables prerendering, for better performance numbers.
27 // It uses mock profiles, and testing factories for AutocompleteClassifier.
28 class PerfTestWithBVC : public PerfTest {
29 public:
30 explicit PerfTestWithBVC(std::string testGroup);
31
32 PerfTestWithBVC(std::string testGroup,
33 std::string firstLabel,
34 std::string averageLabel,
35 bool isWaterfall,
36 bool verbose,
37 bool slowTeardown,
38 int repeat);
39 ~PerfTestWithBVC() override;
40
41 void SetUp() override;
42 void TearDown() override;
43
44 protected:
45 // True if the test needs extra time for Teardown.
46 bool slow_teardown_;
47
48 web::ScopedTestingWebClient web_client_;
49 IOSChromeScopedTestingChromeBrowserProvider provider_;
50 IOSChromeScopedTestingLocalState local_state_;
51
52 std::unique_ptr<TestChromeBrowserState> chrome_browser_state_;
53 std::unique_ptr<TestChromeBrowserState> incognito_chrome_browser_state_;
54
55 base::scoped_nsobject<TabModel> tab_model_;
56 base::scoped_nsobject<TabModel> otr_tab_model_;
57
58 base::scoped_nsobject<BrowserViewControllerDependencyFactory> bvc_factory_;
59 base::scoped_nsobject<BrowserViewController> bvc_;
60 base::scoped_nsobject<UIWindow> window_;
61 };
62
63 #endif // IOS_CHROME_BROWSER_TEST_PERF_TEST_WITH_BVC_IOS_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/tabs/tab_unittest.mm ('k') | ios/chrome/browser/test/perf_test_with_bvc_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698