OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
10 #include "chrome/test/ui/ui_test.h" | 10 #include "chrome/test/ui/ui_test.h" |
11 #include "net/base/net_util.h" | 11 #include "net/base/net_util.h" |
12 | 12 |
| 13 using base::TimeDelta; |
| 14 using base::TimeTicks; |
| 15 |
13 namespace { | 16 namespace { |
14 | 17 |
15 // Wrapper around CopyFile to retry 10 times if there is an error. | 18 // Wrapper around CopyFile to retry 10 times if there is an error. |
16 // For some reasons on buildbot it happens quite often that | 19 // For some reasons on buildbot it happens quite often that |
17 // the test fails because the dll is still in use. | 20 // the test fails because the dll is still in use. |
18 bool CopyFileWrapper(const std::wstring &src, const std::wstring &dest) { | 21 bool CopyFileWrapper(const std::wstring &src, const std::wstring &dest) { |
19 for (int i = 0; i < 10; ++i) { | 22 for (int i = 0; i < 10; ++i) { |
20 if (file_util::CopyFile(src, dest)) | 23 if (file_util::CopyFile(src, dest)) |
21 return true; | 24 return true; |
22 Sleep(1000); | 25 Sleep(1000); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 TEST_F(StartupFileTest, PerfGears) { | 135 TEST_F(StartupFileTest, PerfGears) { |
133 RunStartupTest(L"warm", L"gears", false /* not cold */, | 136 RunStartupTest(L"warm", L"gears", false /* not cold */, |
134 false /* not important */); | 137 false /* not important */); |
135 } | 138 } |
136 | 139 |
137 TEST_F(StartupFileTest, PerfColdGears) { | 140 TEST_F(StartupFileTest, PerfColdGears) { |
138 RunStartupTest(L"cold", L"gears", true /* cold */, | 141 RunStartupTest(L"cold", L"gears", true /* cold */, |
139 false /* not important */); | 142 false /* not important */); |
140 } | 143 } |
141 | 144 |
OLD | NEW |