OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/environment.h" | 6 #include "base/environment.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
11 #include "chrome/common/chrome_paths.h" | 11 #include "chrome/common/chrome_paths.h" |
12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
13 #include "chrome/test/test_launcher_utils.h" | 13 #include "chrome/test/base/test_launcher_utils.h" |
14 #include "ui/gfx/gl/gl_switches.h" | 14 #include "ui/gfx/gl/gl_switches.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 // A multiplier for slow tests. We generally avoid multiplying | 18 // A multiplier for slow tests. We generally avoid multiplying |
19 // test timeouts by any constants. Here it is used as last resort | 19 // test timeouts by any constants. Here it is used as last resort |
20 // to implement the SLOW_ test prefix. | 20 // to implement the SLOW_ test prefix. |
21 static const int kSlowTestTimeoutMultiplier = 5; | 21 static const int kSlowTestTimeoutMultiplier = 5; |
22 | 22 |
23 } // namespace | 23 } // namespace |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Make it possible for selected tests to request a longer timeout. | 101 // Make it possible for selected tests to request a longer timeout. |
102 // Generally tests should really avoid doing too much, and splitting | 102 // Generally tests should really avoid doing too much, and splitting |
103 // a test instead of using SLOW prefix is strongly preferred. | 103 // a test instead of using SLOW prefix is strongly preferred. |
104 if (test_name.find("SLOW_") != std::string::npos) | 104 if (test_name.find("SLOW_") != std::string::npos) |
105 timeout_ms *= kSlowTestTimeoutMultiplier; | 105 timeout_ms *= kSlowTestTimeoutMultiplier; |
106 | 106 |
107 return timeout_ms; | 107 return timeout_ms; |
108 } | 108 } |
109 | 109 |
110 } // namespace test_launcher_utils | 110 } // namespace test_launcher_utils |
OLD | NEW |