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

Unified Diff: extensions/browser/api/declarative_webrequest/webrequest_condition_unittest.cc

Issue 1003953008: Remove prerender cookie store, part 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-revert-cookie-store-3
Patch Set: rebase (just in case since this is so huge) Created 5 years, 9 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
Index: extensions/browser/api/declarative_webrequest/webrequest_condition_unittest.cc
diff --git a/extensions/browser/api/declarative_webrequest/webrequest_condition_unittest.cc b/extensions/browser/api/declarative_webrequest/webrequest_condition_unittest.cc
index 06e5c5b8c32a4a639d6202b95b1ece7e744a5037..a87be273fcc6a4a3e8fdcb99264dfa4056cc5acf 100644
--- a/extensions/browser/api/declarative_webrequest/webrequest_condition_unittest.cc
+++ b/extensions/browser/api/declarative_webrequest/webrequest_condition_unittest.cc
@@ -80,8 +80,8 @@ TEST(WebRequestConditionTest, CreateCondition) {
net::TestURLRequestContext context;
const GURL http_url("http://www.example.com");
- scoped_ptr<net::URLRequest> match_request(context.CreateRequest(
- http_url, net::DEFAULT_PRIORITY, NULL, NULL));
+ scoped_ptr<net::URLRequest> match_request(
+ context.CreateRequest(http_url, net::DEFAULT_PRIORITY, NULL));
WebRequestData data(match_request.get(), ON_BEFORE_REQUEST);
WebRequestDataWithMatchIds request_data(&data);
request_data.url_match_ids = matcher.MatchURL(http_url);
@@ -100,8 +100,8 @@ TEST(WebRequestConditionTest, CreateCondition) {
EXPECT_TRUE(result->IsFulfilled(request_data));
const GURL https_url("https://www.example.com");
- scoped_ptr<net::URLRequest> wrong_resource_type(context.CreateRequest(
- https_url, net::DEFAULT_PRIORITY, NULL, NULL));
+ scoped_ptr<net::URLRequest> wrong_resource_type(
+ context.CreateRequest(https_url, net::DEFAULT_PRIORITY, NULL));
data.request = wrong_resource_type.get();
request_data.url_match_ids = matcher.MatchURL(http_url);
// Make sure IsFulfilled does not fail because of URL matching.
@@ -147,8 +147,8 @@ TEST(WebRequestConditionTest, CreateConditionFirstPartyForCookies) {
net::TestURLRequestContext context;
const GURL http_url("http://www.example.com");
const GURL first_party_url("http://fpfc.example.com");
- scoped_ptr<net::URLRequest> match_request(context.CreateRequest(
- http_url, net::DEFAULT_PRIORITY, NULL, NULL));
+ scoped_ptr<net::URLRequest> match_request(
+ context.CreateRequest(http_url, net::DEFAULT_PRIORITY, NULL));
WebRequestData data(match_request.get(), ON_BEFORE_REQUEST);
WebRequestDataWithMatchIds request_data(&data);
request_data.url_match_ids = matcher.MatchURL(http_url);
@@ -230,7 +230,7 @@ TEST(WebRequestConditionTest, NoUrlAttributes) {
net::TestURLRequestContext context;
scoped_ptr<net::URLRequest> https_request(context.CreateRequest(
- GURL("https://www.example.com"), net::DEFAULT_PRIORITY, NULL, NULL));
+ GURL("https://www.example.com"), net::DEFAULT_PRIORITY, NULL));
// 1. A non-empty condition without UrlFilter attributes is fulfilled iff its
// attributes are fulfilled.
@@ -289,8 +289,8 @@ TEST(WebRequestConditionTest, CreateConditionSet) {
// https://www.example.com
GURL http_url("http://www.example.com");
net::TestURLRequestContext context;
- scoped_ptr<net::URLRequest> http_request(context.CreateRequest(
- http_url, net::DEFAULT_PRIORITY, NULL, NULL));
+ scoped_ptr<net::URLRequest> http_request(
+ context.CreateRequest(http_url, net::DEFAULT_PRIORITY, NULL));
WebRequestData data(http_request.get(), ON_BEFORE_REQUEST);
WebRequestDataWithMatchIds request_data(&data);
request_data.url_match_ids = matcher.MatchURL(http_url);
@@ -301,8 +301,8 @@ TEST(WebRequestConditionTest, CreateConditionSet) {
GURL https_url("https://www.example.com");
request_data.url_match_ids = matcher.MatchURL(https_url);
EXPECT_EQ(1u, request_data.url_match_ids.size());
- scoped_ptr<net::URLRequest> https_request(context.CreateRequest(
- https_url, net::DEFAULT_PRIORITY, NULL, NULL));
+ scoped_ptr<net::URLRequest> https_request(
+ context.CreateRequest(https_url, net::DEFAULT_PRIORITY, NULL));
data.request = https_request.get();
EXPECT_TRUE(result->IsFulfilled(*(request_data.url_match_ids.begin()),
request_data));
@@ -311,8 +311,8 @@ TEST(WebRequestConditionTest, CreateConditionSet) {
GURL https_foo_url("https://foo.example.com");
request_data.url_match_ids = matcher.MatchURL(https_foo_url);
EXPECT_EQ(0u, request_data.url_match_ids.size());
- scoped_ptr<net::URLRequest> https_foo_request(context.CreateRequest(
- https_foo_url, net::DEFAULT_PRIORITY, NULL, NULL));
+ scoped_ptr<net::URLRequest> https_foo_request(
+ context.CreateRequest(https_foo_url, net::DEFAULT_PRIORITY, NULL));
data.request = https_foo_request.get();
EXPECT_FALSE(result->IsFulfilled(-1, request_data));
}
@@ -350,26 +350,26 @@ TEST(WebRequestConditionTest, TestPortFilter) {
// Test various URLs.
GURL http_url("http://www.example.com");
net::TestURLRequestContext context;
- scoped_ptr<net::URLRequest> http_request(context.CreateRequest(
- http_url, net::DEFAULT_PRIORITY, NULL, NULL));
+ scoped_ptr<net::URLRequest> http_request(
+ context.CreateRequest(http_url, net::DEFAULT_PRIORITY, NULL));
url_match_ids = matcher.MatchURL(http_url);
ASSERT_EQ(1u, url_match_ids.size());
GURL http_url_80("http://www.example.com:80");
- scoped_ptr<net::URLRequest> http_request_80(context.CreateRequest(
- http_url_80, net::DEFAULT_PRIORITY, NULL, NULL));
+ scoped_ptr<net::URLRequest> http_request_80(
+ context.CreateRequest(http_url_80, net::DEFAULT_PRIORITY, NULL));
url_match_ids = matcher.MatchURL(http_url_80);
ASSERT_EQ(1u, url_match_ids.size());
GURL http_url_1000("http://www.example.com:1000");
- scoped_ptr<net::URLRequest> http_request_1000(context.CreateRequest(
- http_url_1000, net::DEFAULT_PRIORITY, NULL, NULL));
+ scoped_ptr<net::URLRequest> http_request_1000(
+ context.CreateRequest(http_url_1000, net::DEFAULT_PRIORITY, NULL));
url_match_ids = matcher.MatchURL(http_url_1000);
ASSERT_EQ(1u, url_match_ids.size());
GURL http_url_2000("http://www.example.com:2000");
- scoped_ptr<net::URLRequest> http_request_2000(context.CreateRequest(
- http_url_2000, net::DEFAULT_PRIORITY, NULL, NULL));
+ scoped_ptr<net::URLRequest> http_request_2000(
+ context.CreateRequest(http_url_2000, net::DEFAULT_PRIORITY, NULL));
url_match_ids = matcher.MatchURL(http_url_2000);
ASSERT_EQ(0u, url_match_ids.size());
}

Powered by Google App Engine
This is Rietveld 408576698