OLD | NEW |
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 "google_apis/drive/base_requests.h" | 5 #include "google_apis/drive/base_requests.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/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 15 matching lines...) Expand all Loading... |
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 } | 34 } |
35 | 35 |
36 virtual void SetUp() override { | 36 void SetUp() override { |
37 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 37 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
38 | 38 |
39 request_context_getter_ = new net::TestURLRequestContextGetter( | 39 request_context_getter_ = new net::TestURLRequestContextGetter( |
40 message_loop_.message_loop_proxy()); | 40 message_loop_.message_loop_proxy()); |
41 | 41 |
42 request_sender_.reset(new RequestSender( | 42 request_sender_.reset(new RequestSender( |
43 new DummyAuthService, | 43 new DummyAuthService, |
44 request_context_getter_.get(), | 44 request_context_getter_.get(), |
45 message_loop_.message_loop_proxy(), | 45 message_loop_.message_loop_proxy(), |
46 kTestUserAgent)); | 46 kTestUserAgent)); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 run_loop.Run(); | 122 run_loop.Run(); |
123 } | 123 } |
124 EXPECT_EQ(HTTP_NOT_FOUND, result_code); | 124 EXPECT_EQ(HTTP_NOT_FOUND, result_code); |
125 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method); | 125 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method); |
126 EXPECT_EQ("/files/gdata/no-such-file.txt", | 126 EXPECT_EQ("/files/gdata/no-such-file.txt", |
127 http_request_.relative_url); | 127 http_request_.relative_url); |
128 // Do not verify the not found message. | 128 // Do not verify the not found message. |
129 } | 129 } |
130 | 130 |
131 } // namespace google_apis | 131 } // namespace google_apis |
OLD | NEW |