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

Side by Side Diff: content/common/url_fetcher_unittest.cc

Issue 7846007: net: Rename URLRequestStatus::os_error_. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix os_error_code Created 9 years, 3 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
« no previous file with comments | « content/common/url_fetcher.cc ('k') | net/proxy/proxy_script_fetcher_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/synchronization/waitable_event.h" 6 #include "base/synchronization/waitable_event.h"
7 #include "base/threading/thread.h" 7 #include "base/threading/thread.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/common/url_fetcher.h" 9 #include "content/common/url_fetcher.h"
10 #include "crypto/nss_util.h" 10 #include "crypto/nss_util.h"
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 void URLFetcherBadHTTPSTest::OnURLFetchComplete( 552 void URLFetcherBadHTTPSTest::OnURLFetchComplete(
553 const URLFetcher* source, 553 const URLFetcher* source,
554 const GURL& url, 554 const GURL& url,
555 const net::URLRequestStatus& status, 555 const net::URLRequestStatus& status,
556 int response_code, 556 int response_code,
557 const net::ResponseCookies& cookies, 557 const net::ResponseCookies& cookies,
558 const std::string& data) { 558 const std::string& data) {
559 // This part is different from URLFetcherTest::OnURLFetchComplete 559 // This part is different from URLFetcherTest::OnURLFetchComplete
560 // because this test expects the request to be cancelled. 560 // because this test expects the request to be cancelled.
561 EXPECT_EQ(net::URLRequestStatus::CANCELED, status.status()); 561 EXPECT_EQ(net::URLRequestStatus::CANCELED, status.status());
562 EXPECT_EQ(net::ERR_ABORTED, status.os_error()); 562 EXPECT_EQ(net::ERR_ABORTED, status.error());
563 EXPECT_EQ(-1, response_code); 563 EXPECT_EQ(-1, response_code);
564 EXPECT_TRUE(cookies.empty()); 564 EXPECT_TRUE(cookies.empty());
565 EXPECT_TRUE(data.empty()); 565 EXPECT_TRUE(data.empty());
566 566
567 // The rest is the same as URLFetcherTest::OnURLFetchComplete. 567 // The rest is the same as URLFetcherTest::OnURLFetchComplete.
568 delete fetcher_; 568 delete fetcher_;
569 io_message_loop_proxy()->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 569 io_message_loop_proxy()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
570 } 570 }
571 571
572 void URLFetcherCancelTest::CreateFetcher(const GURL& url) { 572 void URLFetcherCancelTest::CreateFetcher(const GURL& url) {
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 FROM_HERE, 897 FROM_HERE,
898 new CurriedTask(new MessageLoop::QuitTask(), MessageLoop::current())); 898 new CurriedTask(new MessageLoop::QuitTask(), MessageLoop::current()));
899 MessageLoop::current()->Run(); 899 MessageLoop::current()->Run();
900 EXPECT_EQ(1, GetNumFetcherCores()); 900 EXPECT_EQ(1, GetNumFetcherCores());
901 URLFetcher::CancelAll(); 901 URLFetcher::CancelAll();
902 EXPECT_EQ(0, GetNumFetcherCores()); 902 EXPECT_EQ(0, GetNumFetcherCores());
903 delete fetcher_; 903 delete fetcher_;
904 } 904 }
905 905
906 } // namespace. 906 } // namespace.
OLDNEW
« no previous file with comments | « content/common/url_fetcher.cc ('k') | net/proxy/proxy_script_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698