OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 command_line->AppendSwitch(switches::kDisableTabCloseableStateWatcher); | 749 command_line->AppendSwitch(switches::kDisableTabCloseableStateWatcher); |
750 | 750 |
751 // Allow file:// access on ChromeOS. | 751 // Allow file:// access on ChromeOS. |
752 command_line->AppendSwitch(switches::kAllowFileAccess); | 752 command_line->AppendSwitch(switches::kAllowFileAccess); |
753 } | 753 } |
754 | 754 |
755 bool UITestBase::LaunchBrowserHelper(const CommandLine& arguments, | 755 bool UITestBase::LaunchBrowserHelper(const CommandLine& arguments, |
756 bool wait, | 756 bool wait, |
757 base::ProcessHandle* process) { | 757 base::ProcessHandle* process) { |
758 FilePath command = browser_directory_.Append( | 758 FilePath command = browser_directory_.Append( |
759 FilePath::FromWStringHack(chrome::kBrowserProcessExecutablePath)); | 759 chrome::kBrowserProcessExecutablePath); |
760 | 760 |
761 CommandLine command_line(command); | 761 CommandLine command_line(command); |
762 | 762 |
763 // Add command line arguments that should be applied to all UI tests. | 763 // Add command line arguments that should be applied to all UI tests. |
764 PrepareTestCommandline(&command_line); | 764 PrepareTestCommandline(&command_line); |
765 DebugFlags::ProcessDebugFlags( | 765 DebugFlags::ProcessDebugFlags( |
766 &command_line, ChildProcessInfo::UNKNOWN_PROCESS, false); | 766 &command_line, ChildProcessInfo::UNKNOWN_PROCESS, false); |
767 command_line.AppendArguments(arguments, false); | 767 command_line.AppendArguments(arguments, false); |
768 | 768 |
769 // TODO(phajdan.jr): Only run it for "main" browser launch. | 769 // TODO(phajdan.jr): Only run it for "main" browser launch. |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 incorrect_state_count++; | 1190 incorrect_state_count++; |
1191 } | 1191 } |
1192 | 1192 |
1193 LOG(INFO) << "Elapsed time: " << (base::Time::Now() - start).InSecondsF() | 1193 LOG(INFO) << "Elapsed time: " << (base::Time::Now() - start).InSecondsF() |
1194 << " seconds" | 1194 << " seconds" |
1195 << " call failed " << fail_count << " times" | 1195 << " call failed " << fail_count << " times" |
1196 << " state was incorrect " << incorrect_state_count << " times"; | 1196 << " state was incorrect " << incorrect_state_count << " times"; |
1197 ADD_FAILURE() << "Timeout reached in " << __FUNCTION__; | 1197 ADD_FAILURE() << "Timeout reached in " << __FUNCTION__; |
1198 return false; | 1198 return false; |
1199 } | 1199 } |
OLD | NEW |