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/environment.h" | 5 #include "base/environment.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_number_conversions.h" |
10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 profile_type)); | 103 profile_type)); |
104 } | 104 } |
105 | 105 |
106 const int kNumCyclesMax = 20; | 106 const int kNumCyclesMax = 20; |
107 int numCycles = kNumCyclesMax; | 107 int numCycles = kNumCyclesMax; |
108 scoped_ptr<base::Environment> env(base::Environment::Create()); | 108 scoped_ptr<base::Environment> env(base::Environment::Create()); |
109 std::string numCyclesEnv; | 109 std::string numCyclesEnv; |
110 if (env->GetVar(env_vars::kStartupTestsNumCycles, &numCyclesEnv) && | 110 if (env->GetVar(env_vars::kStartupTestsNumCycles, &numCyclesEnv) && |
111 base::StringToInt(numCyclesEnv, &numCycles)) { | 111 base::StringToInt(numCyclesEnv, &numCycles)) { |
112 if (numCycles <= kNumCyclesMax) { | 112 if (numCycles <= kNumCyclesMax) { |
113 LOG(INFO) << env_vars::kStartupTestsNumCycles | 113 VLOG(1) << env_vars::kStartupTestsNumCycles |
114 << " set in environment, so setting numCycles to " | 114 << " set in environment, so setting numCycles to " << numCycles; |
115 << numCycles; | |
116 } else { | 115 } else { |
117 LOG(INFO) << env_vars::kStartupTestsNumCycles | 116 VLOG(1) << env_vars::kStartupTestsNumCycles |
118 << " is higher than the max, setting numCycles to " | 117 << " is higher than the max, setting numCycles to " |
119 << kNumCyclesMax; | 118 << kNumCyclesMax; |
120 numCycles = kNumCyclesMax; | 119 numCycles = kNumCyclesMax; |
121 } | 120 } |
122 } | 121 } |
123 | 122 |
124 struct TimingInfo { | 123 struct TimingInfo { |
125 TimeDelta end_to_end; | 124 TimeDelta end_to_end; |
126 float first_start_ms; | 125 float first_start_ms; |
127 float last_stop_ms; | 126 float last_stop_ms; |
128 float first_stop_ms; | 127 float first_stop_ms; |
129 float nth_tab_stop_ms; | 128 float nth_tab_stop_ms; |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 UITest::CUSTOM_FRAME, 0, 0); | 396 UITest::CUSTOM_FRAME, 0, 0); |
398 } | 397 } |
399 | 398 |
400 TEST_F(StartupTest, PerfNativeFrameGtkTheme) { | 399 TEST_F(StartupTest, PerfNativeFrameGtkTheme) { |
401 RunStartupTest("warm", "custom-frame-gtk-theme", WARM, NOT_IMPORTANT, | 400 RunStartupTest("warm", "custom-frame-gtk-theme", WARM, NOT_IMPORTANT, |
402 UITest::CUSTOM_FRAME_NATIVE_THEME, 0, 0); | 401 UITest::CUSTOM_FRAME_NATIVE_THEME, 0, 0); |
403 } | 402 } |
404 #endif | 403 #endif |
405 | 404 |
406 } // namespace | 405 } // namespace |
OLD | NEW |