| 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 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 } | 956 } |
| 957 | 957 |
| 958 bool UITest::EvictFileFromSystemCacheWrapper(const FilePath& path) { | 958 bool UITest::EvictFileFromSystemCacheWrapper(const FilePath& path) { |
| 959 for (int i = 0; i < 10; i++) { | 959 for (int i = 0; i < 10; i++) { |
| 960 if (file_util::EvictFileFromSystemCache(path)) | 960 if (file_util::EvictFileFromSystemCache(path)) |
| 961 return true; | 961 return true; |
| 962 PlatformThread::Sleep(sleep_timeout_ms() / 10); | 962 PlatformThread::Sleep(sleep_timeout_ms() / 10); |
| 963 } | 963 } |
| 964 return false; | 964 return false; |
| 965 } | 965 } |
| 966 |
| 967 // static |
| 968 FilePath UITest::ComputeTypicalUserDataSource(int profile_type) { |
| 969 FilePath source_history_file; |
| 970 EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, |
| 971 &source_history_file)); |
| 972 if (profile_type == UITest::DEFAULT_THEME) { |
| 973 source_history_file = source_history_file.AppendASCII("profiles") |
| 974 .AppendASCII("typical_history"); |
| 975 } else if (profile_type == UITest::COMPLEX_THEME) { |
| 976 source_history_file = source_history_file.AppendASCII("profiles") |
| 977 .AppendASCII("complex_theme"); |
| 978 } else { |
| 979 NOTREACHED(); |
| 980 } |
| 981 return source_history_file; |
| 982 } |
| 983 |
| 984 |
| OLD | NEW |