summaryrefslogtreecommitdiffstats
path: root/net/http/http_transaction_unittest.h
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 03:49:17 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 03:49:17 +0000
commit1638d605a0f616cbdc1ac7c9fdb6422426808df5 (patch)
treed43290491a2d8516df387994ff45ed9af030b5d3 /net/http/http_transaction_unittest.h
parent559506ebab6e2aa5aa23e9776774bcdaf1901fe2 (diff)
downloadchromium_src-1638d605a0f616cbdc1ac7c9fdb6422426808df5.zip
chromium_src-1638d605a0f616cbdc1ac7c9fdb6422426808df5.tar.gz
chromium_src-1638d605a0f616cbdc1ac7c9fdb6422426808df5.tar.bz2
Replace some net::ERR_FAILED generic error codes with more specific codes.
The goal is to end up with more meaningful errors if a page fails to load. BUG=22623 Review URL: http://codereview.chromium.org/222009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27038 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_transaction_unittest.h')
-rw-r--r--net/http/http_transaction_unittest.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/http/http_transaction_unittest.h b/net/http/http_transaction_unittest.h
index d2e2115..ab27b27 100644
--- a/net/http/http_transaction_unittest.h
+++ b/net/http/http_transaction_unittest.h
@@ -104,8 +104,10 @@ class TestTransactionConsumer : public CallbackRunner< Tuple1<int> > {
public:
explicit TestTransactionConsumer(net::HttpTransactionFactory* factory)
: state_(IDLE),
- trans_(factory->CreateTransaction()),
+ trans_(NULL),
error_(net::OK) {
+ // Disregard the error code.
+ factory->CreateTransaction(&trans_);
++quit_counter_;
}
@@ -310,9 +312,10 @@ class MockNetworkLayer : public net::HttpTransactionFactory {
MockNetworkLayer() : transaction_count_(0) {
}
- virtual net::HttpTransaction* CreateTransaction() {
+ virtual int CreateTransaction(scoped_ptr<net::HttpTransaction>* trans) {
transaction_count_++;
- return new MockNetworkTransaction();
+ trans->reset(new MockNetworkTransaction());
+ return net::OK;
}
virtual net::HttpCache* GetCache() {