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

Unified Diff: chrome/test/chromedriver/net/test_http_server.cc

Issue 12321057: [chromedriver] Implement reconnection to DevTools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some nits and add one unit test. Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/chromedriver/net/test_http_server.cc
diff --git a/chrome/test/chromedriver/net/test_http_server.cc b/chrome/test/chromedriver/net/test_http_server.cc
index b2780871d9dc4e456a9926f66c2a6d0fd5be4e66..1920e98c27d0fea9809c74d6cae2c1d8ef1edb64 100644
--- a/chrome/test/chromedriver/net/test_http_server.cc
+++ b/chrome/test/chromedriver/net/test_http_server.cc
@@ -43,12 +43,15 @@ bool TestHttpServer::Start() {
}
void TestHttpServer::Stop() {
+ if (!server_)
kkania 2013/02/22 01:35:24 although net::HttpServer is ThreadSafeRefCounted,
chrisgao (Use stgao instead) 2013/02/27 19:29:44 Good catch. The check is to avoid calling thread_
+ return;
base::WaitableEvent event(false, false);
thread_.message_loop_proxy()->PostTask(
FROM_HERE,
base::Bind(&TestHttpServer::StopOnServerThread,
base::Unretained(this), &event));
event.Wait();
+ thread_.Stop();
}
bool TestHttpServer::WaitForConnectionsToClose() {

Powered by Google App Engine
This is Rietveld 408576698