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

Side by Side Diff: net/url_request/url_fetcher_impl_unittest.cc

Issue 10640019: Remove the HANDLED_EXTERNALLY status code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase + fix nits Created 8 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | net/url_request/url_request_status.h » ('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) 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 "net/url_request/url_fetcher_impl.h" 5 #include "net/url_request/url_fetcher_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 io_message_loop_proxy(), request_context())); 545 io_message_loop_proxy(), request_context()));
546 fetcher_->SetStopOnRedirect(true); 546 fetcher_->SetStopOnRedirect(true);
547 fetcher_->Start(); 547 fetcher_->Start();
548 } 548 }
549 549
550 void URLFetcherStopOnRedirectTest::OnURLFetchComplete( 550 void URLFetcherStopOnRedirectTest::OnURLFetchComplete(
551 const URLFetcher* source) { 551 const URLFetcher* source) {
552 callback_called_ = true; 552 callback_called_ = true;
553 EXPECT_EQ(GURL(kRedirectTarget), source->GetURL()); 553 EXPECT_EQ(GURL(kRedirectTarget), source->GetURL());
554 EXPECT_EQ(URLRequestStatus::CANCELED, source->GetStatus().status()); 554 EXPECT_EQ(URLRequestStatus::CANCELED, source->GetStatus().status());
555 EXPECT_EQ(ERR_ABORTED, source->GetStatus().error());
555 EXPECT_EQ(301, source->GetResponseCode()); 556 EXPECT_EQ(301, source->GetResponseCode());
556 CleanupAfterFetchComplete(); 557 CleanupAfterFetchComplete();
557 } 558 }
558 559
559 void URLFetcherProtectTest::CreateFetcher(const GURL& url) { 560 void URLFetcherProtectTest::CreateFetcher(const GURL& url) {
560 fetcher_ = new URLFetcherImpl(url, URLFetcher::GET, this); 561 fetcher_ = new URLFetcherImpl(url, URLFetcher::GET, this);
561 fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter( 562 fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
562 io_message_loop_proxy(), request_context())); 563 io_message_loop_proxy(), request_context()));
563 start_time_ = Time::Now(); 564 start_time_ = Time::Now();
564 fetcher_->SetMaxRetries(11); 565 fetcher_->SetMaxRetries(11);
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit(). 1245 MessageLoop::current()->Run(); // OnURLFetchComplete() will Quit().
1245 1246
1246 MessageLoop::current()->RunAllPending(); 1247 MessageLoop::current()->RunAllPending();
1247 ASSERT_FALSE(file_util::PathExists(file_path_)) 1248 ASSERT_FALSE(file_util::PathExists(file_path_))
1248 << file_path_.value() << " not removed."; 1249 << file_path_.value() << " not removed.";
1249 } 1250 }
1250 1251
1251 } // namespace 1252 } // namespace
1252 1253
1253 } // namespace net 1254 } // namespace net
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | net/url_request/url_request_status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698