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

Side by Side Diff: chrome/common/logging_chrome_uitest.cc

Issue 63113: Convert Windows Sleep to PlatformThread::Sleep... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 8 months 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/common/ipc_tests.cc ('k') | chrome/test/automated_ui_tests/automated_ui_tests.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 <string> 5 #include <string>
6 #include <windows.h> 6 #include <windows.h>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
11 #include "chrome/common/env_vars.h" 11 #include "chrome/common/env_vars.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 }; 102 };
103 103
104 // Launch the app in renderer crash test mode, then close the app. 104 // Launch the app in renderer crash test mode, then close the app.
105 TEST_F(RendererCrashTest, Crash) { 105 TEST_F(RendererCrashTest, Crash) {
106 if (UITest::in_process_renderer()) { 106 if (UITest::in_process_renderer()) {
107 // in process mode doesn't do the crashing. 107 // in process mode doesn't do the crashing.
108 expected_crashes_ = 0; 108 expected_crashes_ = 0;
109 } else { 109 } else {
110 // Wait while the process is writing the crash dump. 110 // Wait while the process is writing the crash dump.
111 Sleep(5000); 111 PlatformThread::Sleep(5000);
112 expected_crashes_ = 1; 112 expected_crashes_ = 1;
113 } 113 }
114 } 114 }
115 115
116 // Tests whether we correctly fail on browser crashes during UI Tests. 116 // Tests whether we correctly fail on browser crashes during UI Tests.
117 class BrowserCrashTest : public UITest { 117 class BrowserCrashTest : public UITest {
118 protected: 118 protected:
119 BrowserCrashTest() : UITest() 119 BrowserCrashTest() : UITest()
120 { 120 {
121 // Initial loads will never complete due to crash. 121 // Initial loads will never complete due to crash.
122 wait_for_initial_loads_ = false; 122 wait_for_initial_loads_ = false;
123 123
124 launch_arguments_.AppendSwitch(switches::kBrowserCrashTest); 124 launch_arguments_.AppendSwitch(switches::kBrowserCrashTest);
125 } 125 }
126 }; 126 };
127 127
128 // Launch the app in browser crash test mode. 128 // Launch the app in browser crash test mode.
129 // This test is disabled. See bug 1198934. 129 // This test is disabled. See bug 1198934.
130 TEST_F(BrowserCrashTest, DISABLED_Crash) { 130 TEST_F(BrowserCrashTest, DISABLED_Crash) {
131 // Wait while the process is writing the crash dump. 131 // Wait while the process is writing the crash dump.
132 Sleep(5000); 132 PlatformThread::Sleep(5000);
133 expected_crashes_ = 1; 133 expected_crashes_ = 1;
134 } 134 }
OLDNEW
« no previous file with comments | « chrome/common/ipc_tests.cc ('k') | chrome/test/automated_ui_tests/automated_ui_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698