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..50253e7a734d8f0ad29d9545261166bb393113b7 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,18 +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_EQ(net::ERR_BLOCKED_BY_ADMINISTRATOR, reason); |
+ EXPECT_TRUE(blacklist_manager_->ShouldBlockRequestForFrame( |
+ GURL("http://google.com"), &reason)); |
Andrew T Wilson (Slow)
2015/05/12 16:44:30
This is no longer checking the reason for the requ
mmenke
2015/05/12 16:59:13
Yea, it should still check that (Added back).
mmenke
2015/05/12 17:04:07
I'm happy to add an integration test in a followup
|
} |
TEST_F(URLBlacklistManagerTest, DefaultBlacklistExceptions) { |