| 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 "base/test/ios/wait_util.h" | 5 #import "base/test/ios/wait_util.h" |
| 6 #include "ios/chrome/browser/sessions/ios_chrome_tab_restore_service_factory.h" | 6 #include "ios/chrome/browser/sessions/ios_chrome_tab_restore_service_factory.h" |
| 7 #import "ios/chrome/browser/tabs/tab_model.h" | 7 #import "ios/chrome/browser/tabs/tab_model.h" |
| 8 #include "ios/chrome/browser/test/perf_test_with_bvc_ios.h" | 8 #include "ios/chrome/browser/test/perf_test_with_bvc_ios.h" |
| 9 #import "ios/chrome/browser/ui/browser_view_controller.h" | 9 #import "ios/chrome/browser/ui/browser_view_controller.h" |
| 10 #import "ios/chrome/browser/ui/browser_view_controller_dependency_factory.h" | 10 #import "ios/chrome/browser/ui/browser_view_controller_dependency_factory.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 void SettleUI() { | 43 void SettleUI() { |
| 44 base::test::ios::WaitUntilCondition( | 44 base::test::ios::WaitUntilCondition( |
| 45 nil, false, base::TimeDelta::FromSecondsD(kMaxUICatchupDelay)); | 45 nil, false, base::TimeDelta::FromSecondsD(kMaxUICatchupDelay)); |
| 46 } | 46 } |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 // Output format first test: | 49 // Output format first test: |
| 50 // [*]RESULT NTP - Create: NTP Gentle Create First Tab= number ms | 50 // [*]RESULT NTP - Create: NTP Gentle Create First Tab= number ms |
| 51 // Output format subsequent average: | 51 // Output format subsequent average: |
| 52 // [*]RESULT NTP - Create: NTP Gentle Create= number ms | 52 // [*]RESULT NTP - Create: NTP Gentle Create= number ms |
| 53 TEST_F(NewTabPagePerfTest, OpenNTP_Gentle) { | 53 // TODO(crbug.com/717314): Failed DCHECK in PerfTestWithBVC::SetUp(). |
| 54 TEST_F(NewTabPagePerfTest, DISABLED_OpenNTP_Gentle) { |
| 54 RepeatTimedRuns("NTP Gentle Create", | 55 RepeatTimedRuns("NTP Gentle Create", |
| 55 ^(int index) { | 56 ^(int index) { |
| 56 return TimedNewTab(); | 57 return TimedNewTab(); |
| 57 }, | 58 }, |
| 58 ^{ | 59 ^{ |
| 59 SettleUI(); | 60 SettleUI(); |
| 60 }); | 61 }); |
| 61 } | 62 } |
| 62 | 63 |
| 63 // Output format first test: | 64 // Output format first test: |
| 64 // [*]RESULT NTP - Create: NTP Hammer Create First Tab= number ms | 65 // [*]RESULT NTP - Create: NTP Hammer Create First Tab= number ms |
| 65 // Output format subsequent average: | 66 // Output format subsequent average: |
| 66 // [*]RESULT NTP - Create: NTP Hammer Create= number ms | 67 // [*]RESULT NTP - Create: NTP Hammer Create= number ms |
| 67 TEST_F(NewTabPagePerfTest, OpenNTP_Hammer) { | 68 // TODO(crbug.com/717314): Failed DCHECK in PerfTestWithBVC::SetUp(). |
| 69 TEST_F(NewTabPagePerfTest, DISABLED_OpenNTP_Hammer) { |
| 68 RepeatTimedRuns("NTP Hammer Create", | 70 RepeatTimedRuns("NTP Hammer Create", |
| 69 ^(int index) { | 71 ^(int index) { |
| 70 return TimedNewTab(); | 72 return TimedNewTab(); |
| 71 }, | 73 }, |
| 72 nil); | 74 nil); |
| 73 // Allows the run loops to run before teardown. | 75 // Allows the run loops to run before teardown. |
| 74 SettleUI(); | 76 SettleUI(); |
| 75 } | 77 } |
| 76 | 78 |
| 77 } // anonymous namespace | 79 } // anonymous namespace |
| OLD | NEW |