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

Side by Side Diff: chrome/browser/google_apis/gdata_wapi_operations_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 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"
11 #include "base/json/json_reader.h" 11 #include "base/json/json_reader.h"
12 #include "base/json/json_writer.h" 12 #include "base/json/json_writer.h"
13 #include "base/message_loop_proxy.h" 13 #include "base/message_loop_proxy.h"
14 #include "base/stringprintf.h" 14 #include "base/stringprintf.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "chrome/browser/google_apis/gdata_wapi_operations.h" 17 #include "chrome/browser/google_apis/gdata_wapi_operations.h"
18 #include "chrome/browser/google_apis/gdata_wapi_parser.h" 18 #include "chrome/browser/google_apis/gdata_wapi_parser.h"
19 #include "chrome/browser/google_apis/gdata_wapi_url_generator.h" 19 #include "chrome/browser/google_apis/gdata_wapi_url_generator.h"
20 #include "chrome/browser/google_apis/operation_registry.h" 20 #include "chrome/browser/google_apis/operation_registry.h"
21 #include "chrome/browser/google_apis/task_util.h" 21 #include "chrome/browser/google_apis/task_util.h"
22 #include "chrome/browser/google_apis/test_server/http_request.h"
23 #include "chrome/browser/google_apis/test_server/http_response.h"
24 #include "chrome/browser/google_apis/test_server/http_server.h"
25 #include "chrome/browser/google_apis/test_util.h" 22 #include "chrome/browser/google_apis/test_util.h"
26 #include "chrome/browser/profiles/profile.h" 23 #include "chrome/browser/profiles/profile.h"
27 #include "chrome/test/base/testing_profile.h" 24 #include "chrome/test/base/testing_profile.h"
28 #include "content/public/test/test_browser_thread.h" 25 #include "content/public/test/test_browser_thread.h"
29 #include "net/base/escape.h" 26 #include "net/base/escape.h"
27 #include "net/test/embedded_test_server/http_request.h"
28 #include "net/test/embedded_test_server/http_response.h"
29 #include "net/test/embedded_test_server/http_server.h"
30 #include "net/url_request/url_request_test_util.h" 30 #include "net/url_request/url_request_test_util.h"
31 #include "testing/gtest/include/gtest/gtest.h" 31 #include "testing/gtest/include/gtest/gtest.h"
32 32
33 namespace google_apis { 33 namespace google_apis {
34 34
35 namespace { 35 namespace {
36 36
37 const char kTestGDataAuthToken[] = "testtoken"; 37 const char kTestGDataAuthToken[] = "testtoken";
38 const char kTestUserAgent[] = "test-user-agent"; 38 const char kTestUserAgent[] = "test-user-agent";
39 const char kTestETag[] = "test_etag"; 39 const char kTestETag[] = "test_etag";
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 EXPECT_EQ(base::Int64ToString(kUploadContent.size()), 1480 EXPECT_EQ(base::Int64ToString(kUploadContent.size()),
1481 http_request_.headers["X-Upload-Content-Length"]); 1481 http_request_.headers["X-Upload-Content-Length"]);
1482 // For updating an existing file, an empty body should be attached (PUT 1482 // For updating an existing file, an empty body should be attached (PUT
1483 // requires a body) 1483 // requires a body)
1484 EXPECT_TRUE(http_request_.has_content); 1484 EXPECT_TRUE(http_request_.has_content);
1485 EXPECT_EQ("", http_request_.content); 1485 EXPECT_EQ("", http_request_.content);
1486 EXPECT_EQ(kWrongETag, http_request_.headers["If-Match"]); 1486 EXPECT_EQ(kWrongETag, http_request_.headers["If-Match"]);
1487 } 1487 }
1488 1488
1489 } // namespace google_apis 1489 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/drive_api_operations_unittest.cc ('k') | chrome/browser/google_apis/test_server/http_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698