Commit 7dbbf454 authored by ttuttle@chromium.org's avatar ttuttle@chromium.org

Domain Reliability: Test that uploads do not save/send cookies

For privacy reasons, we want Domain Reliability uploads to be
cookieless. Add a unit test for this.

BUG=356791

Review URL: https://codereview.chromium.org/290093002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271065 0039d316-1c4b-4281-b951-d872f2087c98
parent 4c9e5f1a
......@@ -64,13 +64,15 @@ TEST_F(DomainReliabilityUploaderTest, SuccessfulUpload) {
net::TestURLFetcher* fetcher;
std::string report_json = "{}";
GURL upload_url = GURL("https://test.example/upload");
GURL upload_url = GURL("https://example/upload");
uploader_->UploadReport(report_json, upload_url, MakeUploadCallback(0));
fetcher = url_fetcher_factory_.GetFetcherByID(0);
EXPECT_TRUE(fetcher);
EXPECT_EQ(report_json, fetcher->upload_data());
EXPECT_EQ(upload_url, fetcher->GetOriginalURL());
EXPECT_TRUE(fetcher->GetLoadFlags() & net::LOAD_DO_NOT_SAVE_COOKIES);
EXPECT_TRUE(fetcher->GetLoadFlags() & net::LOAD_DO_NOT_SEND_COOKIES);
fetcher->set_url(upload_url);
fetcher->set_status(net::URLRequestStatus());
......@@ -87,7 +89,7 @@ TEST_F(DomainReliabilityUploaderTest, FailedUpload) {
net::TestURLFetcher* fetcher;
std::string report_json = "{}";
GURL upload_url = GURL("https://test.example/upload");
GURL upload_url = GURL("https://example/upload");
uploader_->UploadReport(report_json, upload_url, MakeUploadCallback(0));
fetcher = url_fetcher_factory_.GetFetcherByID(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment