| 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 4e164aabb8c66d9ac48e188f7bd91eb467013cf8..cb29e943612bef383609cc2039a029bce7b104b1 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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -317,7 +319,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -366,7 +369,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -451,9 +455,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -517,7 +521,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE, false);
|
|
|
| @@ -536,7 +541,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -567,7 +573,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -601,7 +608,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -633,7 +641,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -666,7 +675,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -700,7 +710,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -729,7 +740,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -756,7 +768,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -791,7 +804,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -820,7 +834,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -853,7 +868,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_SUB_RESOURCE, false);
|
| EXPECT_TRUE(handler_.get()); // we could redirect to http (conceivably)
|
| @@ -874,7 +890,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME, false);
|
| EXPECT_TRUE(handler_.get());
|
| @@ -914,7 +931,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;
|
| @@ -952,7 +970,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_ = host_->CreateRequestHandler(request_.get(),
|
| RESOURCE_TYPE_MAIN_FRAME, false);
|
| EXPECT_TRUE(handler_.get());
|
|
|