| 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/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" |
| 11 #include "base/sys_info.h" | 11 #include "base/sys_info.h" |
| 12 #include "base/test/test_file_util.h" | 12 #include "base/test/test_file_util.h" |
| 13 #include "base/time.h" | 13 #include "base/time.h" |
| 14 #include "chrome/common/chrome_constants.h" | 14 #include "chrome/common/chrome_constants.h" |
| 15 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 // Sets the profile data for the run. For now, this is only used for | 100 // Sets the profile data for the run. For now, this is only used for |
| 101 // the non-default themes test. | 101 // the non-default themes test. |
| 102 if (profile_type != UITest::DEFAULT_THEME) { | 102 if (profile_type != UITest::DEFAULT_THEME) { |
| 103 set_template_user_data(UITest::ComputeTypicalUserDataSource( | 103 set_template_user_data(UITest::ComputeTypicalUserDataSource( |
| 104 profile_type)); | 104 profile_type)); |
| 105 } | 105 } |
| 106 | 106 |
| 107 const int kNumCyclesMax = 20; | 107 const int kNumCyclesMax = 20; |
| 108 int numCycles = kNumCyclesMax; | 108 int numCycles = kNumCyclesMax; |
| 109 scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create()); | 109 scoped_ptr<base::Environment> env(base::Environment::Create()); |
| 110 std::string numCyclesEnv; | 110 std::string numCyclesEnv; |
| 111 if (env->GetEnv(env_vars::kStartupTestsNumCycles, &numCyclesEnv) && | 111 if (env->GetEnv(env_vars::kStartupTestsNumCycles, &numCyclesEnv) && |
| 112 base::StringToInt(numCyclesEnv, &numCycles)) { | 112 base::StringToInt(numCyclesEnv, &numCycles)) { |
| 113 if (numCycles <= kNumCyclesMax) { | 113 if (numCycles <= kNumCyclesMax) { |
| 114 LOG(INFO) << env_vars::kStartupTestsNumCycles | 114 LOG(INFO) << env_vars::kStartupTestsNumCycles |
| 115 << " set in environment, so setting numCycles to " | 115 << " set in environment, so setting numCycles to " |
| 116 << numCycles; | 116 << numCycles; |
| 117 } else { | 117 } else { |
| 118 LOG(INFO) << env_vars::kStartupTestsNumCycles | 118 LOG(INFO) << env_vars::kStartupTestsNumCycles |
| 119 << " is higher than the max, setting numCycles to " | 119 << " is higher than the max, setting numCycles to " |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 UITest::CUSTOM_FRAME, 0, 0); | 401 UITest::CUSTOM_FRAME, 0, 0); |
| 402 } | 402 } |
| 403 | 403 |
| 404 TEST_F(StartupTest, PerfNativeFrameGtkTheme) { | 404 TEST_F(StartupTest, PerfNativeFrameGtkTheme) { |
| 405 RunStartupTest("warm", "custom-frame-gtk-theme", WARM, NOT_IMPORTANT, | 405 RunStartupTest("warm", "custom-frame-gtk-theme", WARM, NOT_IMPORTANT, |
| 406 UITest::CUSTOM_FRAME_NATIVE_THEME, 0, 0); | 406 UITest::CUSTOM_FRAME_NATIVE_THEME, 0, 0); |
| 407 } | 407 } |
| 408 #endif | 408 #endif |
| 409 | 409 |
| 410 } // namespace | 410 } // namespace |
| OLD | NEW |