diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-27 17:01:11 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-27 17:01:11 +0000 |
commit | 446378276ae46a33f359df1f6b8137c86a5e2562 (patch) | |
tree | 32d77460a1eeb4356aa6e3609df3cc71d33c6b75 /net | |
parent | 14ad84d2eadeea09449fe57f05a44b670dca327a (diff) | |
download | chromium_src-446378276ae46a33f359df1f6b8137c86a5e2562.zip chromium_src-446378276ae46a33f359df1f6b8137c86a5e2562.tar.gz chromium_src-446378276ae46a33f359df1f6b8137c86a5e2562.tar.bz2 |
Avoid crashing the test process when InterceptRedirector InterceptRestartRequired fail.
The unit tests still fail, but don't crash which allows the other tests to run.
TEST=Run UrlRequest unit tests.
BUG=none
Review URL: http://codereview.chromium.org/173572
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/url_request/url_request_unittest.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc index 49f01a2..0dc7992 100644 --- a/net/url_request/url_request_unittest.cc +++ b/net/url_request/url_request_unittest.cc @@ -1695,7 +1695,9 @@ TEST_F(URLRequestTest, InterceptRedirect) { // Check we got one good response EXPECT_TRUE(req.status().is_success()); - EXPECT_EQ(200, req.response_headers()->response_code()); + if (req.status().is_success()) { + EXPECT_EQ(200, req.response_headers()->response_code()); + } EXPECT_EQ(TestInterceptor::ok_data(), d.data_received()); EXPECT_EQ(1, d.response_started_count()); EXPECT_EQ(0, d.received_redirect_count()); @@ -1784,7 +1786,9 @@ TEST_F(URLRequestTest, InterceptRestartRequired) { // Check we received one good response EXPECT_TRUE(req.status().is_success()); - EXPECT_EQ(200, req.response_headers()->response_code()); + if (req.status().is_success()) { + EXPECT_EQ(200, req.response_headers()->response_code()); + } EXPECT_EQ(TestInterceptor::ok_data(), d.data_received()); EXPECT_EQ(1, d.response_started_count()); EXPECT_EQ(0, d.received_redirect_count()); |