Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Side by Side Diff: chrome/test/ui/ui_test.cc

Issue 8873037: Revert 113676 - Attempt 2 at : Makes tests either use mock compositor or mock (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/base/chrome_test_suite.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
62 59
63 using base::Time; 60 using base::Time;
64 using base::TimeDelta; 61 using base::TimeDelta;
65 using base::TimeTicks; 62 using base::TimeTicks;
66 63
67 const wchar_t UITestBase::kFailedNoCrashService[] = 64 const wchar_t UITestBase::kFailedNoCrashService[] =
68 #if defined(OS_WIN) 65 #if defined(OS_WIN)
69 L"NOTE: This test is expected to fail if crash_service.exe is not " 66 L"NOTE: This test is expected to fail if crash_service.exe is not "
70 L"running. Start it manually before running this test (see the build " 67 L"running. Start it manually before running this test (see the build "
71 L"output directory)."; 68 L"output directory).";
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 void UITestBase::SetLaunchSwitches() { 192 void UITestBase::SetLaunchSwitches() {
196 // We need cookies on file:// for things like the page cycler. 193 // We need cookies on file:// for things like the page cycler.
197 if (enable_file_cookies_) 194 if (enable_file_cookies_)
198 launch_arguments_.AppendSwitch(switches::kEnableFileCookies); 195 launch_arguments_.AppendSwitch(switches::kEnableFileCookies);
199 if (dom_automation_enabled_) 196 if (dom_automation_enabled_)
200 launch_arguments_.AppendSwitch(switches::kDomAutomationController); 197 launch_arguments_.AppendSwitch(switches::kDomAutomationController);
201 if (!homepage_.empty()) 198 if (!homepage_.empty())
202 launch_arguments_.AppendSwitchASCII(switches::kHomePage, homepage_); 199 launch_arguments_.AppendSwitchASCII(switches::kHomePage, homepage_);
203 if (!test_name_.empty()) 200 if (!test_name_.empty())
204 launch_arguments_.AppendSwitchASCII(switches::kTestName, test_name_); 201 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
211 } 202 }
212 203
213 void UITestBase::SetUpProfile() { 204 void UITestBase::SetUpProfile() {
214 } 205 }
215 206
216 void UITestBase::LaunchBrowser() { 207 void UITestBase::LaunchBrowser() {
217 LaunchBrowser(launch_arguments_, clear_profile_); 208 LaunchBrowser(launch_arguments_, clear_profile_);
218 } 209 }
219 210
220 void UITestBase::LaunchBrowserAndServer() { 211 void UITestBase::LaunchBrowserAndServer() {
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms() / kCycles); 790 base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms() / kCycles);
800 } 791 }
801 792
802 LOG(INFO) << "Elapsed time: " << (base::Time::Now() - start).InSecondsF() 793 LOG(INFO) << "Elapsed time: " << (base::Time::Now() - start).InSecondsF()
803 << " seconds" 794 << " seconds"
804 << " call failed " << fail_count << " times" 795 << " call failed " << fail_count << " times"
805 << " state was incorrect " << incorrect_state_count << " times"; 796 << " state was incorrect " << incorrect_state_count << " times";
806 ADD_FAILURE() << "Timeout reached in " << __FUNCTION__; 797 ADD_FAILURE() << "Timeout reached in " << __FUNCTION__;
807 return false; 798 return false;
808 } 799 }
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_test_suite.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698