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

Side by Side Diff: chrome/browser/google_apis/base_requests_server_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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/google_apis/base_requests.h" 5 #include "chrome/browser/google_apis/base_requests.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 12 matching lines...) Expand all
23 namespace google_apis { 23 namespace google_apis {
24 24
25 namespace { 25 namespace {
26 26
27 const char kTestUserAgent[] = "test-user-agent"; 27 const char kTestUserAgent[] = "test-user-agent";
28 28
29 } // namespace 29 } // namespace
30 30
31 class BaseRequestsServerTest : public testing::Test { 31 class BaseRequestsServerTest : public testing::Test {
32 protected: 32 protected:
33 BaseRequestsServerTest() 33 BaseRequestsServerTest() {
34 : test_server_(message_loop_.message_loop_proxy()) {
35 } 34 }
36 35
37 virtual void SetUp() OVERRIDE { 36 virtual void SetUp() OVERRIDE {
38 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 37 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
39 38
40 request_context_getter_ = new net::TestURLRequestContextGetter( 39 request_context_getter_ = new net::TestURLRequestContextGetter(
41 message_loop_.message_loop_proxy()); 40 message_loop_.message_loop_proxy());
42 41
43 request_sender_.reset(new RequestSender( 42 request_sender_.reset(new RequestSender(
44 new DummyAuthService, 43 new DummyAuthService,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 run_loop.Run(); 122 run_loop.Run();
124 } 123 }
125 EXPECT_EQ(HTTP_NOT_FOUND, result_code); 124 EXPECT_EQ(HTTP_NOT_FOUND, result_code);
126 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method); 125 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
127 EXPECT_EQ("/files/gdata/no-such-file.txt", 126 EXPECT_EQ("/files/gdata/no-such-file.txt",
128 http_request_.relative_url); 127 http_request_.relative_url);
129 // Do not verify the not found message. 128 // Do not verify the not found message.
130 } 129 }
131 130
132 } // namespace google_apis 131 } // namespace google_apis
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698