| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "base/perftimer.h" | 7 #include "base/perftimer.h" |
| 8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 virtual void SetUp() {} | 31 virtual void SetUp() {} |
| 32 virtual void TearDown() {} | 32 virtual void TearDown() {} |
| 33 | 33 |
| 34 static const int kNumCycles = 5; | 34 static const int kNumCycles = 5; |
| 35 | 35 |
| 36 void PrintTimings(const char* label, TimeDelta timings[kNumCycles], | 36 void PrintTimings(const char* label, TimeDelta timings[kNumCycles], |
| 37 bool important) { | 37 bool important) { |
| 38 std::string times; | 38 std::string times; |
| 39 for (int i = 0; i < kNumCycles; ++i) | 39 for (int i = 0; i < kNumCycles; ++i) |
| 40 base::StringAppendF(×, "%.2f,", timings[i].InMillisecondsF()); | 40 base::StringAppendF(×, "%.2f,", timings[i].InMillisecondsF()); |
| 41 perf_test::PrintResultList("new_tab", "", label, times, "ms", important); | 41 perf_test::PrintResultList( |
| 42 "new_tab", std::string(), label, times, "ms", important); |
| 42 } | 43 } |
| 43 | 44 |
| 44 void InitProfile(UITestBase::ProfileType profile_type) { | 45 void InitProfile(UITestBase::ProfileType profile_type) { |
| 45 profile_type_ = profile_type; | 46 profile_type_ = profile_type; |
| 46 | 47 |
| 47 // Install the location of the test profile file. | 48 // Install the location of the test profile file. |
| 48 set_template_user_data(UITest::ComputeTypicalUserDataSource( | 49 set_template_user_data(UITest::ComputeTypicalUserDataSource( |
| 49 profile_type)); | 50 profile_type)); |
| 50 } | 51 } |
| 51 | 52 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 false /* not important */, | 191 false /* not important */, |
| 191 UITestBase::COMPLEX_THEME); | 192 UITestBase::COMPLEX_THEME); |
| 192 } | 193 } |
| 193 | 194 |
| 194 // FLAKY: http://crbug.com/69940 | 195 // FLAKY: http://crbug.com/69940 |
| 195 TEST_F(NewTabUIStartupTest, DISABLED_NewTabTimingTestsCold) { | 196 TEST_F(NewTabUIStartupTest, DISABLED_NewTabTimingTestsCold) { |
| 196 RunNewTabTimingTest(); | 197 RunNewTabTimingTest(); |
| 197 } | 198 } |
| 198 | 199 |
| 199 } // namespace | 200 } // namespace |
| OLD | NEW |