diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-28 17:39:10 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-28 17:39:10 +0000 |
commit | 52c287598673611cd46fd9264961a0f38373a43e (patch) | |
tree | ab4817cd5f037e1aa832878cbaa85a4db194b6fb /net | |
parent | f825df2b1438559506e0a8511ad371daac41d2d1 (diff) | |
download | chromium_src-52c287598673611cd46fd9264961a0f38373a43e.zip chromium_src-52c287598673611cd46fd9264961a0f38373a43e.tar.gz chromium_src-52c287598673611cd46fd9264961a0f38373a43e.tar.bz2 |
Fix for the DoNotOverrideReferrer url request test failures observed on the chrome frame IE6 builder.
This test has two steps, the first one which sets a valid referrer in the outgoing request and validates
it. The next step is to set the referrer in the extra request headers and verify that it is not honored.
On IE6 as the URL's are the same the request headers appear to be cached, inspite of the no-cache response
coming back from the web server. To work around this we set the LOAD_VALIDATE_CACHE flag on the second request
which acts like a normal reload operation i.e. an if-none-match/if-modified-since query
Fixes bug http://code.google.com/p/chromium/issues/detail?id=87591
BUG=87591
Review URL: http://codereview.chromium.org/7277016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/url_request/url_request_unittest.cc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc index ba0f9d9..6e51ff6 100644 --- a/net/url_request/url_request_unittest.cc +++ b/net/url_request/url_request_unittest.cc @@ -2504,16 +2504,6 @@ TEST_F(URLRequestTest, DoNotOverrideReferrer) { EXPECT_EQ("http://foo.com/", d.data_received()); } -} - -// TODO(iyengar): Please fix this on Chrome Frame for IE6 and merge this back -// to URLRequestTest.DoNotOverrideReferrer. We do not need to startup a test -// server twice. http://crbug.com/87591 -TEST_F(URLRequestTest, FAILS_DoNotOverrideReferrerIfEmpty) { - TestServer test_server(TestServer::TYPE_HTTP, FilePath()); - ASSERT_TRUE(test_server.Start()); - - scoped_refptr<URLRequestContext> context(new TestURLRequestContext()); // If extra headers contain a referer but the request does not, no referer // shall be sent in the header. @@ -2525,6 +2515,7 @@ TEST_F(URLRequestTest, FAILS_DoNotOverrideReferrerIfEmpty) { HttpRequestHeaders headers; headers.SetHeader(HttpRequestHeaders::kReferer, "http://bar.com/"); req.SetExtraRequestHeaders(headers); + req.set_load_flags(LOAD_VALIDATE_CACHE); req.Start(); MessageLoop::current()->Run(); |