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

Side by Side Diff: chrome/test/automation/proxy_launcher.h

Issue 6794056: Revert 80472 - GTTF: Detect browser crashes on shutdown in UI tests.Previously the automation fra... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
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 #ifndef CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ 5 #ifndef CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_
6 #define CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ 6 #define CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 // Check that no processes related to Chrome exist, displaying 116 // Check that no processes related to Chrome exist, displaying
117 // the given message if any do. 117 // the given message if any do.
118 void AssertAppNotRunning(const std::wstring& error_message); 118 void AssertAppNotRunning(const std::wstring& error_message);
119 119
120 // Returns true when the browser process is running, independent if any 120 // Returns true when the browser process is running, independent if any
121 // renderer process exists or not. It will returns false if an user closed the 121 // renderer process exists or not. It will returns false if an user closed the
122 // window or if the browser process died by itself. 122 // window or if the browser process died by itself.
123 bool IsBrowserRunning(); 123 bool IsBrowserRunning();
124 124
125 // Returns true when timeout_ms milliseconds have elapsed.
126 // Returns false if the browser process died while waiting.
127 bool CrashAwareSleep(int timeout_ms);
128
125 // Wait for the browser process to shut down on its own (i.e. as a result of 129 // Wait for the browser process to shut down on its own (i.e. as a result of
126 // some action that your test has taken). If it has exited within |timeout|, 130 // some action that your test has taken).
127 // puts the exit code in |exit_code| and returns true. 131 bool WaitForBrowserProcessToQuit(int timeout);
128 bool WaitForBrowserProcessToQuit(int timeout, int* exit_code);
129 132
130 AutomationProxy* automation() const; 133 AutomationProxy* automation() const;
131 134
132 // Return the user data directory being used by the browser instance. 135 // Return the user data directory being used by the browser instance.
133 FilePath user_data_dir() const; 136 FilePath user_data_dir() const;
134 137
135 // Get the handle of browser process connected to the automation. This 138 // Get the handle of browser process connected to the automation. This
136 // function only returns a reference to the handle so the caller does not 139 // function only returns a reference to the handle so the caller does not
137 // own the handle returned. 140 // own the handle returned.
138 base::ProcessHandle process() const; 141 base::ProcessHandle process() const;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 344
342 protected: 345 protected:
343 std::string channel_id_; // Channel id of automation proxy. 346 std::string channel_id_; // Channel id of automation proxy.
344 bool disconnect_on_failure_; // True if we disconnect on IPC channel failure. 347 bool disconnect_on_failure_; // True if we disconnect on IPC channel failure.
345 348
346 private: 349 private:
347 DISALLOW_COPY_AND_ASSIGN(AnonymousProxyLauncher); 350 DISALLOW_COPY_AND_ASSIGN(AnonymousProxyLauncher);
348 }; 351 };
349 352
350 #endif // CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ 353 #endif // CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_
OLDNEW
« no previous file with comments | « chrome/common/service_process_util_unittest.cc ('k') | chrome/test/automation/proxy_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698