Lines Matching refs:fetcher
422 void TransferComplete(HttpFetcher* fetcher, bool successful) override { in TransferComplete() argument
424 EXPECT_EQ(kHttpResponseNotFound, fetcher->http_response_code()); in TransferComplete()
426 EXPECT_EQ(kHttpResponseOk, fetcher->http_response_code()); in TransferComplete()
433 void TransferTerminated(HttpFetcher* fetcher) override { in TransferTerminated() argument
458 unique_ptr<HttpFetcher> fetcher(this->test_.NewSmallFetcher()); in TYPED_TEST() local
459 fetcher->set_delegate(&delegate); in TYPED_TEST()
466 fetcher.get(), in TYPED_TEST()
474 unique_ptr<HttpFetcher> fetcher(this->test_.NewLargeFetcher()); in TYPED_TEST() local
475 fetcher->set_delegate(&delegate); in TYPED_TEST()
482 fetcher.get(), in TYPED_TEST()
498 unique_ptr<HttpFetcher> fetcher(this->test_.NewSmallFetcher()); in TYPED_TEST() local
499 fetcher->set_delegate(&delegate); in TYPED_TEST()
506 fetcher.get(), in TYPED_TEST()
512 EXPECT_EQ(0U, fetcher->GetBytesDownloaded()); in TYPED_TEST()
525 unique_ptr<HttpFetcher> fetcher(this->test_.NewSmallFetcher()); in TYPED_TEST() local
526 fetcher->set_delegate(&delegate); in TYPED_TEST()
527 fetcher->SetHeader("User-Agent", "MyTest"); in TYPED_TEST()
528 fetcher->SetHeader("user-agent", "Override that header"); in TYPED_TEST()
529 fetcher->SetHeader("Authorization", "Basic user:passwd"); in TYPED_TEST()
532 fetcher->SetHeader("X-Foo", "Invalid\nHeader\nIgnored"); in TYPED_TEST()
533 fetcher->SetHeader("X-Bar: ", "I do not know how to parse"); in TYPED_TEST()
536 fetcher->SetHeader("Accept", ""); in TYPED_TEST()
545 fetcher.get(), in TYPED_TEST()
562 void ReceivedBytes(HttpFetcher* fetcher, in ReceivedBytes() argument
566 fetcher->Pause(); in ReceivedBytes()
568 void TransferComplete(HttpFetcher* fetcher, bool successful) override { in TransferComplete() argument
571 void TransferTerminated(HttpFetcher* fetcher) override { in TransferTerminated() argument
597 unique_ptr<HttpFetcher> fetcher(this->test_.NewLargeFetcher()); in TYPED_TEST() local
599 delegate.fetcher_ = fetcher.get(); in TYPED_TEST()
600 fetcher->set_delegate(&delegate); in TYPED_TEST()
610 fetcher->BeginTransfer(this->test_.BigUrl(server->GetPort())); in TYPED_TEST()
622 unique_ptr<HttpFetcher> fetcher(this->test_.NewLargeFetcher(&mock_resolver)); in TYPED_TEST() local
628 fetcher->BeginTransfer("http://fake_url"); in TYPED_TEST()
632 fetcher->Pause(); in TYPED_TEST()
633 fetcher->Unpause(); in TYPED_TEST()
634 fetcher->Pause(); in TYPED_TEST()
643 void ReceivedBytes(HttpFetcher* fetcher, in ReceivedBytes() argument
645 void TransferComplete(HttpFetcher* fetcher, bool successful) override { in TransferComplete() argument
649 void TransferTerminated(HttpFetcher* fetcher) override { in TransferTerminated() argument
650 EXPECT_EQ(fetcher, fetcher_.get()); in TransferTerminated()
713 unique_ptr<HttpFetcher> fetcher(this->test_.NewLargeFetcher(&mock_resolver)); in TYPED_TEST() local
716 fetcher->set_delegate(&delegate); in TYPED_TEST()
719 fetcher->BeginTransfer("http://fake_url"); in TYPED_TEST()
729 fetcher->TerminateTransfer(); in TYPED_TEST()
738 void ReceivedBytes(HttpFetcher* fetcher, in ReceivedBytes() argument
742 void TransferComplete(HttpFetcher* fetcher, bool successful) override { in TransferComplete() argument
744 EXPECT_EQ(kHttpResponsePartialContent, fetcher->http_response_code()); in TransferComplete()
747 void TransferTerminated(HttpFetcher* fetcher) override { in TransferTerminated() argument
759 unique_ptr<HttpFetcher> fetcher(this->test_.NewSmallFetcher()); in TYPED_TEST() local
760 fetcher->set_delegate(&delegate); in TYPED_TEST()
767 fetcher.get(), in TYPED_TEST()
802 void ReceivedBytes(HttpFetcher* fetcher, in ReceivedBytes() argument
810 void TransferComplete(HttpFetcher* fetcher, bool successful) override { in TransferComplete() argument
812 EXPECT_EQ(0, fetcher->http_response_code()); in TransferComplete()
816 void TransferTerminated(HttpFetcher* fetcher) override { in TransferTerminated() argument
833 unique_ptr<HttpFetcher> fetcher(this->test_.NewSmallFetcher()); in TYPED_TEST() local
834 fetcher->set_delegate(&delegate); in TYPED_TEST()
839 StartTransfer, fetcher.get(), "http://host_doesnt_exist99999999")); in TYPED_TEST()
859 unique_ptr<HttpFetcher> fetcher(this->test_.NewSmallFetcher()); in TYPED_TEST() local
860 fetcher->set_delegate(&delegate); in TYPED_TEST()
865 fetcher->set_low_speed_limit(kDownloadLowSpeedLimitBps, 1); in TYPED_TEST()
869 fetcher.get(), in TYPED_TEST()
898 unique_ptr<HttpFetcher> fetcher(this->test_.NewSmallFetcher()); in TYPED_TEST() local
899 fetcher->set_delegate(&delegate); in TYPED_TEST()
904 fetcher.get(), in TYPED_TEST()
930 unique_ptr<HttpFetcher> fetcher(this->test_.NewSmallFetcher()); in TYPED_TEST() local
931 fetcher->set_delegate(&delegate); in TYPED_TEST()
936 fetcher.get(), in TYPED_TEST()
947 base::Unretained(fetcher.get())), in TYPED_TEST()
976 void ReceivedBytes(HttpFetcher* fetcher, in ReceivedBytes() argument
980 void TransferComplete(HttpFetcher* fetcher, bool successful) override { in TransferComplete() argument
983 EXPECT_EQ(kHttpResponseOk, fetcher->http_response_code()); in TransferComplete()
985 EXPECT_GE(fetcher->http_response_code(), kHttpResponseMovedPermanently); in TransferComplete()
986 EXPECT_LE(fetcher->http_response_code(), kHttpResponseTempRedirect); in TransferComplete()
990 void TransferTerminated(HttpFetcher* fetcher) override { in TransferTerminated() argument
1003 unique_ptr<HttpFetcher> fetcher(http_fetcher); in RedirectTest() local
1004 fetcher->set_delegate(&delegate); in RedirectTest()
1008 fetcher.get(), in RedirectTest()
1075 void ReceivedBytes(HttpFetcher* fetcher, in ReceivedBytes() argument
1077 EXPECT_EQ(fetcher, fetcher_.get()); in ReceivedBytes()
1081 void TransferComplete(HttpFetcher* fetcher, bool successful) override { in TransferComplete() argument
1082 EXPECT_EQ(fetcher, fetcher_.get()); in TransferComplete()
1085 EXPECT_EQ(expected_response_code_, fetcher->http_response_code()); in TransferComplete()
1091 void TransferTerminated(HttpFetcher* fetcher) override { in TransferTerminated() argument
1274 void ReceivedBytes(HttpFetcher* fetcher, in ReceivedBytes() argument
1278 EXPECT_EQ(fetcher, fetcher_.get()); in ReceivedBytes()
1289 void TransferComplete(HttpFetcher* fetcher, bool successful) override { in TransferComplete() argument
1296 void TransferTerminated(HttpFetcher* fetcher) override { in TransferTerminated() argument
1340 void ReceivedBytes(HttpFetcher* fetcher, in ReceivedBytes() argument
1344 void TransferComplete(HttpFetcher* fetcher, bool successful) override { in TransferComplete() argument
1348 void TransferTerminated(HttpFetcher* fetcher) override { in TransferTerminated() argument
1362 unique_ptr<HttpFetcher> fetcher(fetcher_test->NewLargeFetcher()); in BlockedTransferTestHelper() local
1366 fetcher->set_delegate(&delegate); in BlockedTransferTestHelper()
1370 fetcher.get(), in BlockedTransferTestHelper()