| 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 4a142c448fb0f444f8750347d0bfa89a8ac49d0e..c76ea7ca0b076169457bb9c17f2724925536eee3 100644
|
| --- a/content/browser/appcache/appcache_request_handler_unittest.cc
|
| +++ b/content/browser/appcache/appcache_request_handler_unittest.cc
|
| @@ -32,6 +32,7 @@
|
| #include "net/base/request_priority.h"
|
| #include "net/http/http_response_headers.h"
|
| #include "net/http/http_util.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"
|
| @@ -270,7 +271,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));
|
| @@ -318,7 +320,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));
|
| @@ -368,7 +371,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));
|
| @@ -454,9 +458,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));
|
| @@ -521,7 +525,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));
|
| @@ -541,7 +546,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));
|
| @@ -573,7 +579,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));
|
| @@ -608,7 +615,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));
|
| @@ -641,7 +649,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));
|
| @@ -675,7 +684,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));
|
| @@ -710,7 +720,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));
|
| @@ -740,7 +751,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));
|
| @@ -768,7 +780,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));
|
| @@ -804,7 +817,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));
|
| @@ -834,7 +848,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));
|
| @@ -868,7 +883,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));
|
| @@ -890,7 +906,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));
|
| @@ -931,7 +948,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;
|
| @@ -969,7 +987,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));
|
|
|