| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "chrome/test/ui/ui_test.h" | 5 #include "chrome/test/ui/ui_test.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
| (...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 } | 969 } |
| 970 | 970 |
| 971 bool UITest::EvictFileFromSystemCacheWrapper(const FilePath& path) { | 971 bool UITest::EvictFileFromSystemCacheWrapper(const FilePath& path) { |
| 972 for (int i = 0; i < 10; i++) { | 972 for (int i = 0; i < 10; i++) { |
| 973 if (file_util::EvictFileFromSystemCache(path)) | 973 if (file_util::EvictFileFromSystemCache(path)) |
| 974 return true; | 974 return true; |
| 975 PlatformThread::Sleep(sleep_timeout_ms() / 10); | 975 PlatformThread::Sleep(sleep_timeout_ms() / 10); |
| 976 } | 976 } |
| 977 return false; | 977 return false; |
| 978 } | 978 } |
| 979 |
| 980 // static |
| 981 FilePath UITest::ComputeTypicalUserDataSource(int profile_type) { |
| 982 FilePath source_history_file; |
| 983 EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, |
| 984 &source_history_file)); |
| 985 if (profile_type == UITest::DEFAULT_THEME) { |
| 986 source_history_file = source_history_file.AppendASCII("profiles") |
| 987 .AppendASCII("typical_history"); |
| 988 } else if (profile_type == UITest::COMPLEX_THEME) { |
| 989 source_history_file = source_history_file.AppendASCII("profiles") |
| 990 .AppendASCII("complex_theme"); |
| 991 } else { |
| 992 NOTREACHED(); |
| 993 } |
| 994 return source_history_file; |
| 995 } |
| 996 |
| 997 |
| OLD | NEW |