| 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 "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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 | 767 |
| 768 return result; | 768 return result; |
| 769 } | 769 } |
| 770 | 770 |
| 771 GURL UITest::GetTestUrl(const std::wstring& test_directory, | 771 GURL UITest::GetTestUrl(const std::wstring& test_directory, |
| 772 const std::wstring &test_case) { | 772 const std::wstring &test_case) { |
| 773 std::wstring path; | 773 std::wstring path; |
| 774 PathService::Get(chrome::DIR_TEST_DATA, &path); | 774 PathService::Get(chrome::DIR_TEST_DATA, &path); |
| 775 file_util::AppendToPath(&path, test_directory); | 775 file_util::AppendToPath(&path, test_directory); |
| 776 file_util::AppendToPath(&path, test_case); | 776 file_util::AppendToPath(&path, test_case); |
| 777 return net::FilePathToFileURL(path); | 777 return net::FilePathToFileURL(FilePath::FromWStringHack(path)); |
| 778 } | 778 } |
| 779 | 779 |
| 780 void UITest::WaitForFinish(const std::string &name, | 780 void UITest::WaitForFinish(const std::string &name, |
| 781 const std::string &id, | 781 const std::string &id, |
| 782 const GURL &url, | 782 const GURL &url, |
| 783 const std::string& test_complete_cookie, | 783 const std::string& test_complete_cookie, |
| 784 const std::string& expected_cookie_value, | 784 const std::string& expected_cookie_value, |
| 785 const int wait_time) { | 785 const int wait_time) { |
| 786 const int kIntervalMilliSeconds = 50; | 786 const int kIntervalMilliSeconds = 50; |
| 787 // The webpage being tested has javascript which sets a cookie | 787 // The webpage being tested has javascript which sets a cookie |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 } | 862 } |
| 863 | 863 |
| 864 bool UITest::EvictFileFromSystemCacheWrapper(const FilePath& path) { | 864 bool UITest::EvictFileFromSystemCacheWrapper(const FilePath& path) { |
| 865 for (int i = 0; i < 10; i++) { | 865 for (int i = 0; i < 10; i++) { |
| 866 if (file_util::EvictFileFromSystemCache(path)) | 866 if (file_util::EvictFileFromSystemCache(path)) |
| 867 return true; | 867 return true; |
| 868 PlatformThread::Sleep(1000); | 868 PlatformThread::Sleep(1000); |
| 869 } | 869 } |
| 870 return false; | 870 return false; |
| 871 } | 871 } |
| OLD | NEW |