| 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 #import <UIKit/UIKit.h> | 5 #import <UIKit/UIKit.h> |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #import "base/mac/bind_objc_block.h" | 8 #import "base/mac/bind_objc_block.h" |
| 9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 class StackViewControllerPerfTest : public PerfTestWithBVC { | 152 class StackViewControllerPerfTest : public PerfTestWithBVC { |
| 153 public: | 153 public: |
| 154 StackViewControllerPerfTest() : PerfTestWithBVC("Stack View") {} | 154 StackViewControllerPerfTest() : PerfTestWithBVC("Stack View") {} |
| 155 | 155 |
| 156 void SetUp() override { | 156 void SetUp() override { |
| 157 // Opening a StackViewController is done only on iPhones, not on iPads. | 157 // Opening a StackViewController is done only on iPhones, not on iPads. |
| 158 // This test is meaningless on an iPad. | 158 // This test is meaningless on an iPad. |
| 159 if (IsIPadIdiom()) | 159 if (IsIPadIdiom()) |
| 160 return; | 160 return; |
| 161 | 161 |
| 162 [FullScreenController setHideOmniboxDelaySeconds:0.0]; | |
| 163 | |
| 164 // Base class does most of the setup. | 162 // Base class does most of the setup. |
| 165 PerfTestWithBVC::SetUp(); | 163 PerfTestWithBVC::SetUp(); |
| 166 | 164 |
| 167 current_url_index_ = 0; | 165 current_url_index_ = 0; |
| 168 reuse_svc_ = false; | 166 reuse_svc_ = false; |
| 169 | 167 |
| 170 // The testing delegate will receive stack view animation notifications. | 168 // The testing delegate will receive stack view animation notifications. |
| 171 delegate_.reset([[StackViewControllerPerfTestDelegate alloc] | 169 delegate_.reset([[StackViewControllerPerfTestDelegate alloc] |
| 172 initWithBrowserViewController:bvc_]); | 170 initWithBrowserViewController:bvc_]); |
| 173 } | 171 } |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 CalculateAverage(close_times + 1, kNumTests - 1, NULL, &max_close); | 397 CalculateAverage(close_times + 1, kNumTests - 1, NULL, &max_close); |
| 400 LogPerfTiming("Open cold", open_times[0]); | 398 LogPerfTiming("Open cold", open_times[0]); |
| 401 LogPerfTiming("Open warm avg", open_avg); | 399 LogPerfTiming("Open warm avg", open_avg); |
| 402 LogPerfTiming("Open warm max", max_open); | 400 LogPerfTiming("Open warm max", max_open); |
| 403 LogPerfTiming("Close cold", close_times[0]); | 401 LogPerfTiming("Close cold", close_times[0]); |
| 404 LogPerfTiming("Close cold avg", close_avg); | 402 LogPerfTiming("Close cold avg", close_avg); |
| 405 LogPerfTiming("Close cold max", max_close); | 403 LogPerfTiming("Close cold max", max_close); |
| 406 } | 404 } |
| 407 | 405 |
| 408 } // anonymous namespace | 406 } // anonymous namespace |
| OLD | NEW |