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 "chrome/test/ui/ui_test.h" | 5 #include "chrome/test/ui/ui_test.h" |
6 | 6 |
7 #if defined(OS_POSIX) | 7 #if defined(OS_POSIX) |
8 #include <signal.h> | 8 #include <signal.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 #endif | 10 #endif |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 | 565 |
566 DictionaryValue* UITest::GetLocalState() { | 566 DictionaryValue* UITest::GetLocalState() { |
567 FilePath local_state_path; | 567 FilePath local_state_path; |
568 PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); | 568 PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); |
569 return LoadDictionaryValueFromPath(local_state_path); | 569 return LoadDictionaryValueFromPath(local_state_path); |
570 } | 570 } |
571 | 571 |
572 DictionaryValue* UITest::GetDefaultProfilePreferences() { | 572 DictionaryValue* UITest::GetDefaultProfilePreferences() { |
573 FilePath path; | 573 FilePath path; |
574 PathService::Get(chrome::DIR_USER_DATA, &path); | 574 PathService::Get(chrome::DIR_USER_DATA, &path); |
575 path = path.AppendASCII(chrome::kNotSignedInProfile); | 575 path = path.AppendASCII(chrome::kInitialProfile); |
576 return LoadDictionaryValueFromPath(path.Append(chrome::kPreferencesFilename)); | 576 return LoadDictionaryValueFromPath(path.Append(chrome::kPreferencesFilename)); |
577 } | 577 } |
578 | 578 |
579 void UITest::WaitForFinish(const std::string &name, | 579 void UITest::WaitForFinish(const std::string &name, |
580 const std::string &id, | 580 const std::string &id, |
581 const GURL &url, | 581 const GURL &url, |
582 const std::string& test_complete_cookie, | 582 const std::string& test_complete_cookie, |
583 const std::string& expected_cookie_value, | 583 const std::string& expected_cookie_value, |
584 const int wait_time) { | 584 const int wait_time) { |
585 // The webpage being tested has javascript which sets a cookie | 585 // The webpage being tested has javascript which sets a cookie |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms() / kCycles); | 781 base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms() / kCycles); |
782 } | 782 } |
783 | 783 |
784 LOG(INFO) << "Elapsed time: " << (base::Time::Now() - start).InSecondsF() | 784 LOG(INFO) << "Elapsed time: " << (base::Time::Now() - start).InSecondsF() |
785 << " seconds" | 785 << " seconds" |
786 << " call failed " << fail_count << " times" | 786 << " call failed " << fail_count << " times" |
787 << " state was incorrect " << incorrect_state_count << " times"; | 787 << " state was incorrect " << incorrect_state_count << " times"; |
788 ADD_FAILURE() << "Timeout reached in " << __FUNCTION__; | 788 ADD_FAILURE() << "Timeout reached in " << __FUNCTION__; |
789 return false; | 789 return false; |
790 } | 790 } |
OLD | NEW |