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

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

Issue 16950028: Move file_util::Delete to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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) 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/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 ProgressCallback(), 95 ProgressCallback(),
96 test_server_.GetURL("/files/chromeos/gdata/testfile.txt"), 96 test_server_.GetURL("/files/chromeos/gdata/testfile.txt"),
97 GetTestCachedFilePath( 97 GetTestCachedFilePath(
98 base::FilePath::FromUTF8Unsafe("cached_testfile.txt"))); 98 base::FilePath::FromUTF8Unsafe("cached_testfile.txt")));
99 request_sender_->StartRequestWithRetry(request); 99 request_sender_->StartRequestWithRetry(request);
100 run_loop.Run(); 100 run_loop.Run();
101 } 101 }
102 102
103 std::string contents; 103 std::string contents;
104 file_util::ReadFileToString(temp_file, &contents); 104 file_util::ReadFileToString(temp_file, &contents);
105 file_util::Delete(temp_file, false); 105 base::Delete(temp_file, false);
106 106
107 EXPECT_EQ(HTTP_SUCCESS, result_code); 107 EXPECT_EQ(HTTP_SUCCESS, result_code);
108 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method); 108 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
109 EXPECT_EQ("/files/chromeos/gdata/testfile.txt", http_request_.relative_url); 109 EXPECT_EQ("/files/chromeos/gdata/testfile.txt", http_request_.relative_url);
110 110
111 const base::FilePath expected_path = 111 const base::FilePath expected_path =
112 test_util::GetTestFilePath("chromeos/gdata/testfile.txt"); 112 test_util::GetTestFilePath("chromeos/gdata/testfile.txt");
113 std::string expected_contents; 113 std::string expected_contents;
114 file_util::ReadFileToString(expected_path, &expected_contents); 114 file_util::ReadFileToString(expected_path, &expected_contents);
115 EXPECT_EQ(expected_contents, contents); 115 EXPECT_EQ(expected_contents, contents);
(...skipping 18 matching lines...) Expand all
134 run_loop.Run(); 134 run_loop.Run();
135 } 135 }
136 EXPECT_EQ(HTTP_NOT_FOUND, result_code); 136 EXPECT_EQ(HTTP_NOT_FOUND, result_code);
137 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method); 137 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
138 EXPECT_EQ("/files/chromeos/gdata/no-such-file.txt", 138 EXPECT_EQ("/files/chromeos/gdata/no-such-file.txt",
139 http_request_.relative_url); 139 http_request_.relative_url);
140 // Do not verify the not found message. 140 // Do not verify the not found message.
141 } 141 }
142 142
143 } // namespace google_apis 143 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google/google_update_settings_posix.cc ('k') | chrome/browser/history/history_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698