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

Unified Diff: net/test/embedded_test_server/http_server_unittest.cc

Issue 14971002: GTTF: move chrome/browser/google_apis/test_server to net/test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased, OWNERS Created 7 years, 7 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
« no previous file with comments | « net/test/embedded_test_server/http_server.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/embedded_test_server/http_server_unittest.cc
diff --git a/chrome/browser/google_apis/test_server/http_server_unittest.cc b/net/test/embedded_test_server/http_server_unittest.cc
similarity index 96%
rename from chrome/browser/google_apis/test_server/http_server_unittest.cc
rename to net/test/embedded_test_server/http_server_unittest.cc
index 48e58837eefa6000690eaf776527ccb7070d1c49..d10622cf10b5c4601c37c70bac2180005d2fa52b 100644
--- a/chrome/browser/google_apis/test_server/http_server_unittest.cc
+++ b/net/test/embedded_test_server/http_server_unittest.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/google_apis/test_server/http_server.h"
+#include "net/test/embedded_test_server/http_server.h"
#include "base/stringprintf.h"
#include "base/threading/thread.h"
-#include "chrome/browser/google_apis/test_server/http_request.h"
-#include "chrome/browser/google_apis/test_server/http_response.h"
#include "net/http/http_response_headers.h"
+#include "net/test/embedded_test_server/http_request.h"
+#include "net/test/embedded_test_server/http_response.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "net/url_request/url_request_test_util.h"
@@ -69,14 +69,15 @@ class HttpServerTest : public testing::Test,
virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE {
++num_responses_received_;
if (num_responses_received_ == num_responses_expected_)
- message_loop_.Quit();
+ MessageLoop::current()->Quit();
}
// Waits until the specified number of responses are received.
void WaitForResponses(int num_responses) {
num_responses_received_ = 0;
num_responses_expected_ = num_responses;
- message_loop_.Run(); // Will be terminated in OnURLFetchComplete().
+ // Will be terminated in OnURLFetchComplete().
+ MessageLoop::current()->Run();
}
// Handles |request| sent to |path| and returns the response per |content|,
@@ -105,7 +106,6 @@ class HttpServerTest : public testing::Test,
int num_responses_expected_;
std::string request_relative_url_;
base::Thread io_thread_;
- MessageLoop message_loop_;
scoped_refptr<net::TestURLRequestContextGetter> request_context_getter_;
scoped_ptr<HttpServer> server_;
};
« no previous file with comments | « net/test/embedded_test_server/http_server.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698