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

Unified Diff: chrome/browser/policy/url_blacklist_manager_unittest.cc

Issue 51953002: [Net] Add a priority parameter to URLRequest's constructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error from rebase Created 7 years, 2 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: chrome/browser/policy/url_blacklist_manager_unittest.cc
diff --git a/chrome/browser/policy/url_blacklist_manager_unittest.cc b/chrome/browser/policy/url_blacklist_manager_unittest.cc
index 9d716084566ca5804bf8ebb22029da7ebf3413a6..43d44fac27465114d7b53a8f8d264eec71ddb7e5 100644
--- a/chrome/browser/policy/url_blacklist_manager_unittest.cc
+++ b/chrome/browser/policy/url_blacklist_manager_unittest.cc
@@ -13,6 +13,7 @@
#include "chrome/common/pref_names.h"
#include "content/public/test/test_browser_thread.h"
#include "google_apis/gaia/gaia_urls.h"
+#include "net/base/request_priority.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -496,7 +497,8 @@ TEST_F(URLBlacklistManagerTest, DontBlockResources) {
EXPECT_TRUE(blacklist_manager_->IsURLBlocked(GURL("http://google.com")));
net::TestURLRequestContext context;
- net::URLRequest request(GURL("http://google.com"), NULL, &context);
+ net::URLRequest request(
+ GURL("http://google.com"), net::DEFAULT_PRIORITY, NULL, &context, NULL);
mmenke 2013/10/30 15:27:11 Again, prefer not to add dependencies on context's
akalin 2013/10/30 21:44:37 removed arg.
// Background requests aren't filtered.
EXPECT_FALSE(blacklist_manager_->IsRequestBlocked(request));
@@ -515,7 +517,8 @@ TEST_F(URLBlacklistManagerTest, DontBlockResources) {
GURL sync_url(GaiaUrls::GetInstance()->service_login_url().Resolve(
"?service=chromiumsync"));
- net::URLRequest sync_request(sync_url, NULL, &context);
+ net::URLRequest sync_request(
+ sync_url, net::DEFAULT_PRIORITY, NULL, &context, NULL);
sync_request.set_load_flags(net::LOAD_MAIN_FRAME);
EXPECT_EQ(block_signin_urls,
blacklist_manager_->IsRequestBlocked(sync_request));

Powered by Google App Engine
This is Rietveld 408576698