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_util.h" | 10 #include "base/string_util.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // the non-default themes test. | 102 // the non-default themes test. |
103 if (profile_type != UITest::DEFAULT_THEME) { | 103 if (profile_type != UITest::DEFAULT_THEME) { |
104 set_template_user_data(UITest::ComputeTypicalUserDataSource( | 104 set_template_user_data(UITest::ComputeTypicalUserDataSource( |
105 profile_type)); | 105 profile_type)); |
106 } | 106 } |
107 | 107 |
108 const int kNumCyclesMax = 20; | 108 const int kNumCyclesMax = 20; |
109 int numCycles = kNumCyclesMax; | 109 int numCycles = kNumCyclesMax; |
110 scoped_ptr<base::Environment> env(base::Environment::Create()); | 110 scoped_ptr<base::Environment> env(base::Environment::Create()); |
111 std::string numCyclesEnv; | 111 std::string numCyclesEnv; |
112 if (env->GetEnv(env_vars::kStartupTestsNumCycles, &numCyclesEnv) && | 112 if (env->GetVar(env_vars::kStartupTestsNumCycles, &numCyclesEnv) && |
113 base::StringToInt(numCyclesEnv, &numCycles)) { | 113 base::StringToInt(numCyclesEnv, &numCycles)) { |
114 if (numCycles <= kNumCyclesMax) { | 114 if (numCycles <= kNumCyclesMax) { |
115 LOG(INFO) << env_vars::kStartupTestsNumCycles | 115 LOG(INFO) << env_vars::kStartupTestsNumCycles |
116 << " set in environment, so setting numCycles to " | 116 << " set in environment, so setting numCycles to " |
117 << numCycles; | 117 << numCycles; |
118 } else { | 118 } else { |
119 LOG(INFO) << env_vars::kStartupTestsNumCycles | 119 LOG(INFO) << env_vars::kStartupTestsNumCycles |
120 << " is higher than the max, setting numCycles to " | 120 << " is higher than the max, setting numCycles to " |
121 << kNumCyclesMax; | 121 << kNumCyclesMax; |
122 numCycles = kNumCyclesMax; | 122 numCycles = kNumCyclesMax; |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 UITest::CUSTOM_FRAME, 0, 0); | 402 UITest::CUSTOM_FRAME, 0, 0); |
403 } | 403 } |
404 | 404 |
405 TEST_F(StartupTest, PerfNativeFrameGtkTheme) { | 405 TEST_F(StartupTest, PerfNativeFrameGtkTheme) { |
406 RunStartupTest("warm", "custom-frame-gtk-theme", WARM, NOT_IMPORTANT, | 406 RunStartupTest("warm", "custom-frame-gtk-theme", WARM, NOT_IMPORTANT, |
407 UITest::CUSTOM_FRAME_NATIVE_THEME, 0, 0); | 407 UITest::CUSTOM_FRAME_NATIVE_THEME, 0, 0); |
408 } | 408 } |
409 #endif | 409 #endif |
410 | 410 |
411 } // namespace | 411 } // namespace |
OLD | NEW |