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

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

Issue 1134733004: Remove LOAD_SUB_FRAME load flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to atwilson's comments Created 5 years, 7 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
« no previous file with comments | « chrome/browser/net/connect_interceptor.cc ('k') | components/policy/core/browser/url_blacklist_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6bdf1bcba25a11a8a3f8df2ae9a681fd1edb354e..a21df066ef5e5c75f17321259d03b9206fb1c4b3 100644
--- a/chrome/browser/policy/url_blacklist_manager_unittest.cc
+++ b/chrome/browser/policy/url_blacklist_manager_unittest.cc
@@ -7,6 +7,7 @@
#include <ostream>
#include "base/basictypes.h"
+#include "base/bind.h"
#include "base/callback.h"
#include "base/message_loop/message_loop.h"
#include "base/prefs/pref_registry_simple.h"
@@ -18,10 +19,6 @@
#include "google_apis/gaia/gaia_urls.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
-#include "net/base/request_priority.h"
-#include "net/url_request/url_request.h"
-#include "net/url_request/url_request_context.h"
-#include "net/url_request/url_request_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -642,17 +639,9 @@ TEST_F(URLBlacklistManagerTest, DontBlockResources) {
blacklist_manager_->SetBlacklist(blacklist.Pass());
EXPECT_TRUE(blacklist_manager_->IsURLBlocked(GURL("http://google.com")));
- net::TestURLRequestContext context;
- scoped_ptr<net::URLRequest> request(context.CreateRequest(
- GURL("http://google.com"), net::DEFAULT_PRIORITY, NULL));
-
int reason = net::ERR_UNEXPECTED;
- // Background requests aren't filtered.
- EXPECT_FALSE(blacklist_manager_->IsRequestBlocked(*request.get(), &reason));
-
- // Main frames are filtered.
- request->SetLoadFlags(net::LOAD_MAIN_FRAME);
- EXPECT_TRUE(blacklist_manager_->IsRequestBlocked(*request.get(), &reason));
+ EXPECT_TRUE(blacklist_manager_->ShouldBlockRequestForFrame(
+ GURL("http://google.com"), &reason));
EXPECT_EQ(net::ERR_BLOCKED_BY_ADMINISTRATOR, reason);
}
« no previous file with comments | « chrome/browser/net/connect_interceptor.cc ('k') | components/policy/core/browser/url_blacklist_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698