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

Side by Side Diff: chrome/browser/extensions/api/declarative_webrequest/webrequest_action_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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/api/declarative_webrequest/webrequest_action.h" 5 #include "extensions/browser/api/declarative_webrequest/webrequest_action.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/json/json_file_value_serializer.h" 8 #include "base/json/json_file_value_serializer.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 false /*incognito_enabled*/, 134 false /*incognito_enabled*/,
135 false /*notifications_disabled*/); 135 false /*notifications_disabled*/);
136 } 136 }
137 137
138 bool WebRequestActionWithThreadsTest::ActionWorksOnRequest( 138 bool WebRequestActionWithThreadsTest::ActionWorksOnRequest(
139 const char* url_string, 139 const char* url_string,
140 const std::string& extension_id, 140 const std::string& extension_id,
141 const WebRequestActionSet* action_set, 141 const WebRequestActionSet* action_set,
142 RequestStage stage) { 142 RequestStage stage) {
143 scoped_ptr<net::URLRequest> regular_request(context_.CreateRequest( 143 scoped_ptr<net::URLRequest> regular_request(context_.CreateRequest(
144 GURL(url_string), net::DEFAULT_PRIORITY, NULL, NULL)); 144 GURL(url_string), net::DEFAULT_PRIORITY, NULL));
145 std::list<LinkedPtrEventResponseDelta> deltas; 145 std::list<LinkedPtrEventResponseDelta> deltas;
146 scoped_refptr<net::HttpResponseHeaders> headers( 146 scoped_refptr<net::HttpResponseHeaders> headers(
147 new net::HttpResponseHeaders("")); 147 new net::HttpResponseHeaders(""));
148 WebRequestData request_data(regular_request.get(), stage, headers.get()); 148 WebRequestData request_data(regular_request.get(), stage, headers.get());
149 std::set<std::string> ignored_tags; 149 std::set<std::string> ignored_tags;
150 WebRequestAction::ApplyInfo apply_info = { extension_info_map_.get(), 150 WebRequestAction::ApplyInfo apply_info = { extension_info_map_.get(),
151 request_data, 151 request_data,
152 false /*crosses_incognito*/, 152 false /*crosses_incognito*/,
153 &deltas, &ignored_tags }; 153 &deltas, &ignored_tags };
154 action_set->Apply(extension_id, base::Time(), &apply_info); 154 action_set->Apply(extension_id, base::Time(), &apply_info);
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 for (WebRequestActionSet::Actions::const_iterator it = 582 for (WebRequestActionSet::Actions::const_iterator it =
583 action_set->actions().begin(); 583 action_set->actions().begin();
584 it != action_set->actions().end(); 584 it != action_set->actions().end();
585 ++it) { 585 ++it) {
586 EXPECT_EQ(kExpectedNames[index], (*it)->GetName()); 586 EXPECT_EQ(kExpectedNames[index], (*it)->GetName());
587 ++index; 587 ++index;
588 } 588 }
589 } 589 }
590 590
591 } // namespace extensions 591 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698