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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #include "chrome/test/base/test_switches.h" | 49 #include "chrome/test/base/test_switches.h" |
50 #include "content/common/debug_flags.h" | 50 #include "content/common/debug_flags.h" |
51 #include "googleurl/src/gurl.h" | 51 #include "googleurl/src/gurl.h" |
52 #include "net/base/net_util.h" | 52 #include "net/base/net_util.h" |
53 #include "ui/gfx/gl/gl_implementation.h" | 53 #include "ui/gfx/gl/gl_implementation.h" |
54 | 54 |
55 #if defined(OS_WIN) | 55 #if defined(OS_WIN) |
56 #include "base/win/windows_version.h" | 56 #include "base/win/windows_version.h" |
57 #endif | 57 #endif |
58 | 58 |
| 59 #if defined(USE_AURA) |
| 60 #include "ui/gfx/compositor/compositor_switches.h" |
| 61 #endif |
59 | 62 |
60 using base::Time; | 63 using base::Time; |
61 using base::TimeDelta; | 64 using base::TimeDelta; |
62 using base::TimeTicks; | 65 using base::TimeTicks; |
63 | 66 |
64 const wchar_t UITestBase::kFailedNoCrashService[] = | 67 const wchar_t UITestBase::kFailedNoCrashService[] = |
65 #if defined(OS_WIN) | 68 #if defined(OS_WIN) |
66 L"NOTE: This test is expected to fail if crash_service.exe is not " | 69 L"NOTE: This test is expected to fail if crash_service.exe is not " |
67 L"running. Start it manually before running this test (see the build " | 70 L"running. Start it manually before running this test (see the build " |
68 L"output directory)."; | 71 L"output directory)."; |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 void UITestBase::SetLaunchSwitches() { | 195 void UITestBase::SetLaunchSwitches() { |
193 // We need cookies on file:// for things like the page cycler. | 196 // We need cookies on file:// for things like the page cycler. |
194 if (enable_file_cookies_) | 197 if (enable_file_cookies_) |
195 launch_arguments_.AppendSwitch(switches::kEnableFileCookies); | 198 launch_arguments_.AppendSwitch(switches::kEnableFileCookies); |
196 if (dom_automation_enabled_) | 199 if (dom_automation_enabled_) |
197 launch_arguments_.AppendSwitch(switches::kDomAutomationController); | 200 launch_arguments_.AppendSwitch(switches::kDomAutomationController); |
198 if (!homepage_.empty()) | 201 if (!homepage_.empty()) |
199 launch_arguments_.AppendSwitchASCII(switches::kHomePage, homepage_); | 202 launch_arguments_.AppendSwitchASCII(switches::kHomePage, homepage_); |
200 if (!test_name_.empty()) | 203 if (!test_name_.empty()) |
201 launch_arguments_.AppendSwitchASCII(switches::kTestName, test_name_); | 204 launch_arguments_.AppendSwitchASCII(switches::kTestName, test_name_); |
| 205 #if defined(USE_AURA) |
| 206 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 207 switches::kDisableTestCompositor)) { |
| 208 launch_arguments_.AppendSwitch(switches::kTestCompositor); |
| 209 } |
| 210 #endif |
202 } | 211 } |
203 | 212 |
204 void UITestBase::SetUpProfile() { | 213 void UITestBase::SetUpProfile() { |
205 } | 214 } |
206 | 215 |
207 void UITestBase::LaunchBrowser() { | 216 void UITestBase::LaunchBrowser() { |
208 LaunchBrowser(launch_arguments_, clear_profile_); | 217 LaunchBrowser(launch_arguments_, clear_profile_); |
209 } | 218 } |
210 | 219 |
211 void UITestBase::LaunchBrowserAndServer() { | 220 void UITestBase::LaunchBrowserAndServer() { |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms() / kCycles); | 799 base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms() / kCycles); |
791 } | 800 } |
792 | 801 |
793 LOG(INFO) << "Elapsed time: " << (base::Time::Now() - start).InSecondsF() | 802 LOG(INFO) << "Elapsed time: " << (base::Time::Now() - start).InSecondsF() |
794 << " seconds" | 803 << " seconds" |
795 << " call failed " << fail_count << " times" | 804 << " call failed " << fail_count << " times" |
796 << " state was incorrect " << incorrect_state_count << " times"; | 805 << " state was incorrect " << incorrect_state_count << " times"; |
797 ADD_FAILURE() << "Timeout reached in " << __FUNCTION__; | 806 ADD_FAILURE() << "Timeout reached in " << __FUNCTION__; |
798 return false; | 807 return false; |
799 } | 808 } |
OLD | NEW |