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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | net/url_request/view_cache_helper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_unittest.cc
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index fd9a6504cedd1b9f90aea0897ac14ad0dd2c1a81..b328056610a645e2ad60cb3c712d22513393af01 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -20,7 +20,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_loop_proxy.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
@@ -29,6 +28,7 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "net/base/chunked_upload_data_stream.h"
#include "net/base/elements_upload_data_stream.h"
#include "net/base/load_flags.h"
@@ -242,12 +242,9 @@ void TestLoadTimingNoHttpResponse(
// Do a case-insensitive search through |haystack| for |needle|.
bool ContainsString(const std::string& haystack, const char* needle) {
- std::string::const_iterator it =
- std::search(haystack.begin(),
- haystack.end(),
- needle,
- needle + strlen(needle),
- base::CaseInsensitiveCompare<char>());
+ std::string::const_iterator it = std::search(
+ haystack.begin(), haystack.end(), needle, needle + strlen(needle),
+ base::CaseInsensitiveCompareASCII<char>());
return it != haystack.end();
}
@@ -634,7 +631,7 @@ class URLRequestTest : public PlatformTest {
job_factory_impl_->SetProtocolHandler("data", new DataProtocolHandler);
#if !defined(DISABLE_FILE_SUPPORT)
job_factory_impl_->SetProtocolHandler(
- "file", new FileProtocolHandler(base::MessageLoopProxy::current()));
+ "file", new FileProtocolHandler(base::ThreadTaskRunnerHandle::Get()));
#endif
}
@@ -5110,11 +5107,8 @@ TEST_F(URLRequestTestHTTP, PostFileTest) {
path = path.Append(FILE_PATH_LITERAL("url_request_unittest"));
path = path.Append(FILE_PATH_LITERAL("with-headers.html"));
element_readers.push_back(
- new UploadFileElementReader(base::MessageLoopProxy::current().get(),
- path,
- 0,
- kuint64max,
- base::Time()));
+ new UploadFileElementReader(base::ThreadTaskRunnerHandle::Get().get(),
+ path, 0, kuint64max, base::Time()));
r->set_upload(make_scoped_ptr<UploadDataStream>(
new ElementsUploadDataStream(element_readers.Pass(), 0)));
@@ -5154,12 +5148,10 @@ TEST_F(URLRequestTestHTTP, PostUnreadableFileTest) {
ScopedVector<UploadElementReader> element_readers;
element_readers.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current().get(),
+ base::ThreadTaskRunnerHandle::Get().get(),
base::FilePath(FILE_PATH_LITERAL(
"c:\\path\\to\\non\\existant\\file.randomness.12345")),
- 0,
- kuint64max,
- base::Time()));
+ 0, kuint64max, base::Time()));
r->set_upload(make_scoped_ptr<UploadDataStream>(
new ElementsUploadDataStream(element_readers.Pass(), 0)));
@@ -5528,7 +5520,8 @@ TEST_F(URLRequestTestHTTP, ProtocolHandlerAndFactoryRestrictDataRedirects) {
TEST_F(URLRequestTestHTTP, ProtocolHandlerAndFactoryRestrictFileRedirects) {
// Test URLRequestJobFactory::ProtocolHandler::IsSafeRedirectTarget().
GURL file_url("file:///foo.txt");
- FileProtocolHandler file_protocol_handler(base::MessageLoopProxy::current());
+ FileProtocolHandler file_protocol_handler(
+ base::ThreadTaskRunnerHandle::Get());
EXPECT_FALSE(file_protocol_handler.IsSafeRedirectTarget(file_url));
// Test URLRequestJobFactoryImpl::IsSafeRedirectTarget().
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | net/url_request/view_cache_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698