Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Unified Diff: content/common/resource_dispatcher_unittest.cc

Issue 10640019: Remove the HANDLED_EXTERNALLY status code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase + fix nits Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/resource_dispatcher_unittest.cc
diff --git a/content/common/resource_dispatcher_unittest.cc b/content/common/resource_dispatcher_unittest.cc
index b1e6c5832405e6a83fd2fe91cdd851d2dcb79fce..ce514c0bd350491715d8eb4b896bd471a2cb94e6 100644
--- a/content/common/resource_dispatcher_unittest.cc
+++ b/content/common/resource_dispatcher_unittest.cc
@@ -13,6 +13,7 @@
#include "content/common/resource_dispatcher.h"
#include "content/common/resource_messages.h"
#include "content/public/common/resource_response.h"
+#include "net/base/net_errors.h"
#include "net/base/upload_data.h"
#include "net/http/http_response_headers.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -68,9 +69,10 @@ class TestRequestCallback : public ResourceLoaderBridge::Peer {
}
virtual void OnCompletedRequest(
- const net::URLRequestStatus& status,
+ int error_code,
+ bool was_ignored_by_handler,
const std::string& security_info,
- const base::TimeTicks& completion_time) OVERRIDE {
+ const base::TimeTicks& completion_time) {
EXPECT_FALSE(complete_);
complete_ = true;
}
@@ -246,7 +248,7 @@ class DeferredResourceLoadingTest : public ResourceDispatcherTest,
set_defer_loading(true);
ResourceResponseHead response_head;
- response_head.status.set_status(net::URLRequestStatus::SUCCESS);
+ response_head.error_code = net::OK;
dispatcher_->OnMessageReceived(
ResourceMsg_ReceivedResponse(0, 0, response_head));
@@ -292,9 +294,10 @@ class DeferredResourceLoadingTest : public ResourceDispatcherTest,
}
virtual void OnCompletedRequest(
- const net::URLRequestStatus& status,
+ int error_code,
+ bool was_ignored_by_handler,
const std::string& security_info,
- const base::TimeTicks& completion_time) OVERRIDE {
+ const base::TimeTicks& completion_time) {
}
protected:
@@ -378,7 +381,8 @@ class TimeConversionTest : public ResourceDispatcherTest,
}
virtual void OnCompletedRequest(
- const net::URLRequestStatus& status,
+ int error_code,
+ bool was_ignored_by_handler,
const std::string& security_info,
const base::TimeTicks& completion_time) OVERRIDE {
}
@@ -392,7 +396,7 @@ class TimeConversionTest : public ResourceDispatcherTest,
// TODO(simonjam): Enable this when 10829031 lands.
TEST_F(TimeConversionTest, DISABLED_ProperlyInitialized) {
ResourceResponseHead response_head;
- response_head.status.set_status(net::URLRequestStatus::SUCCESS);
+ response_head.error_code = net::OK;
response_head.request_start = base::TimeTicks::FromInternalValue(5);
response_head.response_start = base::TimeTicks::FromInternalValue(15);
response_head.load_timing.base_time = base::Time::Now();
@@ -409,7 +413,7 @@ TEST_F(TimeConversionTest, DISABLED_ProperlyInitialized) {
TEST_F(TimeConversionTest, PartiallyInitialized) {
ResourceResponseHead response_head;
- response_head.status.set_status(net::URLRequestStatus::SUCCESS);
+ response_head.error_code = net::OK;
response_head.request_start = base::TimeTicks::FromInternalValue(5);
response_head.response_start = base::TimeTicks::FromInternalValue(15);
@@ -421,7 +425,7 @@ TEST_F(TimeConversionTest, PartiallyInitialized) {
TEST_F(TimeConversionTest, NotInitialized) {
ResourceResponseHead response_head;
- response_head.status.set_status(net::URLRequestStatus::SUCCESS);
+ response_head.error_code = net::OK;
PerformTest(response_head);
« no previous file with comments | « content/common/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698