| Index: content/browser/appcache/appcache_request_handler_unittest.cc
|
| diff --git a/content/browser/appcache/appcache_request_handler_unittest.cc b/content/browser/appcache/appcache_request_handler_unittest.cc
|
| index a570f1756247273ba9941ba1325e661860de7dce..99a3c5dcf3f5a20c8637d8d1e7fb2d842eaea336 100644
|
| --- a/content/browser/appcache/appcache_request_handler_unittest.cc
|
| +++ b/content/browser/appcache/appcache_request_handler_unittest.cc
|
| @@ -30,6 +30,7 @@
|
| #include "net/base/net_errors.h"
|
| #include "net/base/request_priority.h"
|
| #include "net/http/http_response_headers.h"
|
| +#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
|
| #include "net/url_request/url_request.h"
|
| #include "net/url_request/url_request_context.h"
|
| #include "net/url_request/url_request_error_job.h"
|
| @@ -277,7 +278,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| base::Unretained(this)));
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME,
|
| false));
|
| @@ -325,7 +327,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| base::Unretained(this)));
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME,
|
| false));
|
| @@ -375,7 +378,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| base::Unretained(this)));
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME,
|
| false));
|
| @@ -456,9 +460,9 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| &AppCacheRequestHandlerTest::Verify_MainResource_FallbackOverride,
|
| base::Unretained(this)));
|
|
|
| - request_ =
|
| - empty_context_->CreateRequest(GURL("http://blah/fallback-override"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + request_ = empty_context_->CreateRequest(
|
| + GURL("http://blah/fallback-override"), net::DEFAULT_PRIORITY,
|
| + &delegate_, TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME,
|
| false));
|
| @@ -523,7 +527,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
|
|
| void SubResource_Miss_WithNoCacheSelected() {
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE,
|
| false));
|
| @@ -543,7 +548,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| host_->AssociateCompleteCache(MakeNewCache());
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE,
|
| false));
|
| @@ -575,7 +581,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| host_->set_preferred_manifest_url(cache->owning_group()->manifest_url());
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE,
|
| false));
|
| @@ -610,7 +617,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| AppCacheEntry(AppCacheEntry::EXPLICIT, 1), AppCacheEntry(), false);
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE,
|
| false));
|
| @@ -643,7 +651,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| AppCacheEntry(), AppCacheEntry(AppCacheEntry::EXPLICIT, 1), false);
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE,
|
| false));
|
| @@ -677,7 +686,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| AppCacheEntry(), AppCacheEntry(AppCacheEntry::EXPLICIT, 1), false);
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE,
|
| false));
|
| @@ -712,7 +722,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| AppCacheEntry(), AppCacheEntry(), true);
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE,
|
| false));
|
| @@ -742,7 +753,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| AppCacheEntry(AppCacheEntry::EXPLICIT, 1), AppCacheEntry(), false);
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE,
|
| false));
|
| @@ -770,7 +782,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| host_->pending_selected_cache_id_ = 1;
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE,
|
| false));
|
| @@ -806,7 +819,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| AppCacheEntry(AppCacheEntry::EXPLICIT, 1), AppCacheEntry(), false);
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE,
|
| false));
|
| @@ -836,7 +850,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
|
|
| void DestroyedServiceWithCrossSiteNav() {
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME,
|
| false));
|
| @@ -870,7 +885,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| host_->pending_selected_cache_id_ = 1;
|
|
|
| request_ = empty_context_->CreateRequest(GURL("ftp://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE,
|
| false));
|
| @@ -892,7 +908,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
|
|
| void CanceledRequest() {
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME,
|
| false));
|
| @@ -933,7 +950,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| RESOURCE_TYPE_WORKER));
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
|
|
| const int kParentHostId = host_->host_id();
|
| const int kWorkerHostId = 2;
|
| @@ -971,7 +989,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
|
| base::Unretained(this)));
|
|
|
| request_ = empty_context_->CreateRequest(GURL("http://blah/"),
|
| - net::DEFAULT_PRIORITY, &delegate_);
|
| + net::DEFAULT_PRIORITY, &delegate_,
|
| + TRAFFIC_ANNOTATION_FOR_TESTS);
|
| handler_.reset(host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME,
|
| false));
|
|
|