| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/env_var.h" | 5 #include "base/env_var.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/platform_thread.h" | 8 #include "base/platform_thread.h" |
| 9 #include "base/string_number_conversions.h" |
| 9 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 10 #include "base/sys_info.h" | 11 #include "base/sys_info.h" |
| 11 #include "base/test/test_file_util.h" | 12 #include "base/test/test_file_util.h" |
| 12 #include "base/time.h" | 13 #include "base/time.h" |
| 13 #include "chrome/common/chrome_constants.h" | 14 #include "chrome/common/chrome_constants.h" |
| 14 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
| 15 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 16 #include "chrome/common/env_vars.h" | 17 #include "chrome/common/env_vars.h" |
| 17 #include "chrome/test/ui/ui_test.h" | 18 #include "chrome/test/ui/ui_test.h" |
| 18 #include "chrome/test/ui_test_utils.h" | 19 #include "chrome/test/ui_test_utils.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 220 |
| 220 times.clear(); | 221 times.clear(); |
| 221 name = name_base + "-first"; | 222 name = name_base + "-first"; |
| 222 for (int i = 0; i < numCycles; ++i) | 223 for (int i = 0; i < numCycles; ++i) |
| 223 StringAppendF(×, "%.2f,", timings[i].first_stop_ms); | 224 StringAppendF(×, "%.2f,", timings[i].first_stop_ms); |
| 224 PrintResultList(graph, "", name.c_str(), times, "ms", important); | 225 PrintResultList(graph, "", name.c_str(), times, "ms", important); |
| 225 | 226 |
| 226 if (nth_timed_tab > 0) { | 227 if (nth_timed_tab > 0) { |
| 227 // Display only the time necessary to load the first n tabs. | 228 // Display only the time necessary to load the first n tabs. |
| 228 times.clear(); | 229 times.clear(); |
| 229 name = name_base + "-" + IntToString(nth_timed_tab); | 230 name = name_base + "-" + base::IntToString(nth_timed_tab); |
| 230 for (int i = 0; i < numCycles; ++i) | 231 for (int i = 0; i < numCycles; ++i) |
| 231 StringAppendF(×, "%.2f,", timings[i].nth_tab_stop_ms); | 232 StringAppendF(×, "%.2f,", timings[i].nth_tab_stop_ms); |
| 232 PrintResultList(graph, "", name.c_str(), times, "ms", important); | 233 PrintResultList(graph, "", name.c_str(), times, "ms", important); |
| 233 } | 234 } |
| 234 | 235 |
| 235 if (num_tabs > 1) { | 236 if (num_tabs > 1) { |
| 236 // Display the time necessary to load all of the tabs. | 237 // Display the time necessary to load all of the tabs. |
| 237 times.clear(); | 238 times.clear(); |
| 238 name = name_base + "-all"; | 239 name = name_base + "-all"; |
| 239 for (int i = 0; i < numCycles; ++i) | 240 for (int i = 0; i < numCycles; ++i) |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 UITest::CUSTOM_FRAME, 0, 0); | 401 UITest::CUSTOM_FRAME, 0, 0); |
| 401 } | 402 } |
| 402 | 403 |
| 403 TEST_F(StartupTest, PerfNativeFrameGtkTheme) { | 404 TEST_F(StartupTest, PerfNativeFrameGtkTheme) { |
| 404 RunStartupTest("warm", "custom-frame-gtk-theme", WARM, NOT_IMPORTANT, | 405 RunStartupTest("warm", "custom-frame-gtk-theme", WARM, NOT_IMPORTANT, |
| 405 UITest::CUSTOM_FRAME_NATIVE_THEME, 0, 0); | 406 UITest::CUSTOM_FRAME_NATIVE_THEME, 0, 0); |
| 406 } | 407 } |
| 407 #endif | 408 #endif |
| 408 | 409 |
| 409 } // namespace | 410 } // namespace |
| OLD | NEW |