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

Side by Side Diff: chrome/browser/google_apis/gdata_wapi_requests_unittest.cc

Issue 37683004: GTTF: Make EmbeddedTestServer always use its own thread for IO (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots Created 7 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <algorithm> 5 #include <algorithm>
6 #include <map> 6 #include <map>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 21 matching lines...) Expand all
32 namespace google_apis { 32 namespace google_apis {
33 33
34 namespace { 34 namespace {
35 35
36 const char kTestUserAgent[] = "test-user-agent"; 36 const char kTestUserAgent[] = "test-user-agent";
37 const char kTestETag[] = "test_etag"; 37 const char kTestETag[] = "test_etag";
38 const char kTestDownloadPathPrefix[] = "/download/"; 38 const char kTestDownloadPathPrefix[] = "/download/";
39 39
40 class GDataWapiRequestsTest : public testing::Test { 40 class GDataWapiRequestsTest : public testing::Test {
41 public: 41 public:
42 GDataWapiRequestsTest() 42 GDataWapiRequestsTest() {
43 : test_server_(message_loop_.message_loop_proxy()) {
44 } 43 }
45 44
46 virtual void SetUp() OVERRIDE { 45 virtual void SetUp() OVERRIDE {
47 request_context_getter_ = new net::TestURLRequestContextGetter( 46 request_context_getter_ = new net::TestURLRequestContextGetter(
48 message_loop_.message_loop_proxy()); 47 message_loop_.message_loop_proxy());
49 48
50 request_sender_.reset(new RequestSender(new DummyAuthService, 49 request_sender_.reset(new RequestSender(new DummyAuthService,
51 request_context_getter_.get(), 50 request_context_getter_.get(),
52 message_loop_.message_loop_proxy(), 51 message_loop_.message_loop_proxy(),
53 kTestUserAgent)); 52 kTestUserAgent));
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 EXPECT_EQ(HTTP_SUCCESS, result_code); 1587 EXPECT_EQ(HTTP_SUCCESS, result_code);
1589 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method); 1588 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
1590 EXPECT_EQ(kTestDownloadPathPrefix + kTestId, http_request_.relative_url); 1589 EXPECT_EQ(kTestDownloadPathPrefix + kTestId, http_request_.relative_url);
1591 EXPECT_EQ(kDownloadedFilePath, temp_file); 1590 EXPECT_EQ(kDownloadedFilePath, temp_file);
1592 1591
1593 const std::string expected_contents = kTestId + kTestId + kTestId; 1592 const std::string expected_contents = kTestId + kTestId + kTestId;
1594 EXPECT_EQ(expected_contents, contents); 1593 EXPECT_EQ(expected_contents, contents);
1595 } 1594 }
1596 1595
1597 } // namespace google_apis 1596 } // namespace google_apis
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698