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

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

Issue 191293009: Cleanup: Move kAboutScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | 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 chrome::kAboutScheme, 235 content::kAboutScheme, new chrome_browser_net::AboutProtocolHandler());
236 new chrome_browser_net::AboutProtocolHandler());
237 context_->set_job_factory(&job_factory); 236 context_->set_job_factory(&job_factory);
238 237
239 GURL redirect_url("about:redirected"); 238 GURL redirect_url("about:redirected");
240 GURL not_chosen_redirect_url("about:not_chosen"); 239 GURL not_chosen_redirect_url("about:not_chosen");
241 240
242 net::URLRequest request( 241 net::URLRequest request(
243 GURL("about:blank"), net::DEFAULT_PRIORITY, &delegate_, context_.get()); 242 GURL("about:blank"), net::DEFAULT_PRIORITY, &delegate_, context_.get());
244 { 243 {
245 // onBeforeRequest will be dispatched twice initially. The second response - 244 // onBeforeRequest will be dispatched twice initially. The second response -
246 // 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 1889 matching lines...) Expand 10 before | Expand all | Expand 10 after
2136 EXPECT_TRUE(credentials_set); 2135 EXPECT_TRUE(credentials_set);
2137 EXPECT_FALSE(auth3.Empty()); 2136 EXPECT_FALSE(auth3.Empty());
2138 EXPECT_EQ(username, auth1.username()); 2137 EXPECT_EQ(username, auth1.username());
2139 EXPECT_EQ(password, auth1.password()); 2138 EXPECT_EQ(password, auth1.password());
2140 EXPECT_EQ(1u, warning_set.size()); 2139 EXPECT_EQ(1u, warning_set.size());
2141 EXPECT_TRUE(HasWarning(warning_set, "extid2")); 2140 EXPECT_TRUE(HasWarning(warning_set, "extid2"));
2142 EXPECT_EQ(3u, capturing_net_log.GetSize()); 2141 EXPECT_EQ(3u, capturing_net_log.GetSize());
2143 } 2142 }
2144 2143
2145 } // namespace extensions 2144 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698