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

Side by Side Diff: chrome/common/net/url_fetcher_unittest.cc

Issue 5384002: net: Remove typedef net::URLRequest URLRequest; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/message_loop_proxy.h" 5 #include "base/message_loop_proxy.h"
6 #include "base/thread.h" 6 #include "base/thread.h"
7 #include "base/waitable_event.h" 7 #include "base/waitable_event.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/common/chrome_plugin_lib.h" 9 #include "chrome/common/chrome_plugin_lib.h"
10 #include "chrome/common/net/url_fetcher.h" 10 #include "chrome/common/net/url_fetcher.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 PathService::Get(base::DIR_SOURCE_ROOT, &cert_dir_); 388 PathService::Get(base::DIR_SOURCE_ROOT, &cert_dir_);
389 cert_dir_ = cert_dir_.AppendASCII("chrome"); 389 cert_dir_ = cert_dir_.AppendASCII("chrome");
390 cert_dir_ = cert_dir_.AppendASCII("test"); 390 cert_dir_ = cert_dir_.AppendASCII("test");
391 cert_dir_ = cert_dir_.AppendASCII("data"); 391 cert_dir_ = cert_dir_.AppendASCII("data");
392 cert_dir_ = cert_dir_.AppendASCII("ssl"); 392 cert_dir_ = cert_dir_.AppendASCII("ssl");
393 cert_dir_ = cert_dir_.AppendASCII("certificates"); 393 cert_dir_ = cert_dir_.AppendASCII("certificates");
394 } 394 }
395 395
396 // The "server certificate expired" error should result in automatic 396 // The "server certificate expired" error should result in automatic
397 // cancellation of the request by 397 // cancellation of the request by
398 // URLRequest::Delegate::OnSSLCertificateError. 398 // net::URLRequest::Delegate::OnSSLCertificateError.
399 void URLFetcherBadHTTPSTest::OnURLFetchComplete( 399 void URLFetcherBadHTTPSTest::OnURLFetchComplete(
400 const URLFetcher* source, 400 const URLFetcher* source,
401 const GURL& url, 401 const GURL& url,
402 const URLRequestStatus& status, 402 const URLRequestStatus& status,
403 int response_code, 403 int response_code,
404 const ResponseCookies& cookies, 404 const ResponseCookies& cookies,
405 const std::string& data) { 405 const std::string& data) {
406 // This part is different from URLFetcherTest::OnURLFetchComplete 406 // This part is different from URLFetcherTest::OnURLFetchComplete
407 // because this test expects the request to be cancelled. 407 // because this test expects the request to be cancelled.
408 EXPECT_EQ(URLRequestStatus::CANCELED, status.status()); 408 EXPECT_EQ(URLRequestStatus::CANCELED, status.status());
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 base::Thread t("URLFetcher test thread"); 623 base::Thread t("URLFetcher test thread");
624 ASSERT_TRUE(t.Start()); 624 ASSERT_TRUE(t.Start());
625 t.message_loop()->PostTask(FROM_HERE, new FetcherWrapperTask(this, url)); 625 t.message_loop()->PostTask(FROM_HERE, new FetcherWrapperTask(this, url));
626 626
627 MessageLoop::current()->Run(); 627 MessageLoop::current()->Run();
628 628
629 net::URLRequestThrottlerManager::GetInstance()->EraseEntryForTests(url); 629 net::URLRequestThrottlerManager::GetInstance()->EraseEntryForTests(url);
630 } 630 }
631 631
632 } // namespace. 632 } // namespace.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698