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

Side by Side Diff: chrome/browser/extensions/api/web_request/web_request_api_unittest.cc

Issue 325443002: Move about://-related constants from //content to //url (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android ifx Created 6 years, 6 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 | Annotate | Revision Log
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 <map> 5 #include <map>
6 #include <queue> 6 #include <queue>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 &profile_, extension1_id, extension1_id, kEventName, kEventName + "/1", 225 &profile_, extension1_id, extension1_id, kEventName, kEventName + "/1",
226 filter, ExtensionWebRequestEventRouter::ExtraInfoSpec::BLOCKING, -1, -1, 226 filter, ExtensionWebRequestEventRouter::ExtraInfoSpec::BLOCKING, -1, -1,
227 ipc_sender_factory.GetWeakPtr()); 227 ipc_sender_factory.GetWeakPtr());
228 ExtensionWebRequestEventRouter::GetInstance()->AddEventListener( 228 ExtensionWebRequestEventRouter::GetInstance()->AddEventListener(
229 &profile_, extension2_id, extension2_id, kEventName, kEventName + "/2", 229 &profile_, extension2_id, extension2_id, kEventName, kEventName + "/2",
230 filter, ExtensionWebRequestEventRouter::ExtraInfoSpec::BLOCKING, -1, -1, 230 filter, ExtensionWebRequestEventRouter::ExtraInfoSpec::BLOCKING, -1, -1,
231 ipc_sender_factory.GetWeakPtr()); 231 ipc_sender_factory.GetWeakPtr());
232 232
233 net::URLRequestJobFactoryImpl job_factory; 233 net::URLRequestJobFactoryImpl job_factory;
234 job_factory.SetProtocolHandler( 234 job_factory.SetProtocolHandler(
235 content::kAboutScheme, new chrome_browser_net::AboutProtocolHandler()); 235 url::kAboutScheme, new chrome_browser_net::AboutProtocolHandler());
236 context_->set_job_factory(&job_factory); 236 context_->set_job_factory(&job_factory);
237 237
238 GURL redirect_url("about:redirected"); 238 GURL redirect_url("about:redirected");
239 GURL not_chosen_redirect_url("about:not_chosen"); 239 GURL not_chosen_redirect_url("about:not_chosen");
240 240
241 net::URLRequest request( 241 net::URLRequest request(
242 GURL("about:blank"), net::DEFAULT_PRIORITY, &delegate_, context_.get()); 242 GURL("about:blank"), net::DEFAULT_PRIORITY, &delegate_, context_.get());
243 { 243 {
244 // onBeforeRequest will be dispatched twice initially. The second response - 244 // onBeforeRequest will be dispatched twice initially. The second response -
245 // the redirect - should win, since it has a later |install_time|. The 245 // the redirect - should win, since it has a later |install_time|. The
(...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after
2223 EXPECT_TRUE(credentials_set); 2223 EXPECT_TRUE(credentials_set);
2224 EXPECT_FALSE(auth3.Empty()); 2224 EXPECT_FALSE(auth3.Empty());
2225 EXPECT_EQ(username, auth1.username()); 2225 EXPECT_EQ(username, auth1.username());
2226 EXPECT_EQ(password, auth1.password()); 2226 EXPECT_EQ(password, auth1.password());
2227 EXPECT_EQ(1u, warning_set.size()); 2227 EXPECT_EQ(1u, warning_set.size());
2228 EXPECT_TRUE(HasWarning(warning_set, "extid2")); 2228 EXPECT_TRUE(HasWarning(warning_set, "extid2"));
2229 EXPECT_EQ(3u, capturing_net_log.GetSize()); 2229 EXPECT_EQ(3u, capturing_net_log.GetSize());
2230 } 2230 }
2231 2231
2232 } // namespace extensions 2232 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698