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

Unified Diff: chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc

Issue 2484633004: Change Lo-Fi bool to bitmask to support multiple Previews types (Closed)
Patch Set: thakis comments Created 3 years, 11 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/extensions/api/web_request/web_request_permissions_unittest.cc
diff --git a/chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc
index af28138ea03c875afe827aa26cacab2d394543d9..3682c629d2003640518204b74b50cdbfd117d9ee 100644
--- a/chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc
@@ -11,6 +11,7 @@
#include "chrome/common/extensions/extension_test_util.h"
#include "chromeos/login/login_state.h"
#include "content/public/browser/resource_request_info.h"
+#include "content/public/common/previews_state.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "extensions/browser/api/web_request/web_request_permissions.h"
#include "extensions/browser/info_map.h"
@@ -151,19 +152,15 @@ TEST_F(ExtensionWebRequestHelpersTestWithThreadsTest, TestHideRequestForURL) {
int view_id = 17;
std::unique_ptr<net::URLRequest> sensitive_request(
context.CreateRequest(non_sensitive_url, net::DEFAULT_PRIORITY, NULL));
- ResourceRequestInfo::AllocateForTesting(sensitive_request.get(),
- content::RESOURCE_TYPE_SCRIPT,
- NULL,
- process_id,
- view_id,
- MSG_ROUTING_NONE,
- false, // is_main_frame
- false, // parent_is_main_frame
- true, // allow_download
- false, // is_async
- false); // is_using_lofi
- extension_info_map_->RegisterExtensionProcess(
- extensions::kWebStoreAppId, process_id, site_instance_id);
+ ResourceRequestInfo::AllocateForTesting(
+ sensitive_request.get(), content::RESOURCE_TYPE_SCRIPT, NULL,
+ process_id, view_id, MSG_ROUTING_NONE,
+ /*is_main_frame=*/false,
+ /*parent_is_main_frame=*/false,
+ /*allow_download=*/true,
+ /*is_async=*/false, content::PREVIEWS_OFF);
+ extension_info_map_->RegisterExtensionProcess(extensions::kWebStoreAppId,
+ process_id, site_instance_id);
EXPECT_TRUE(WebRequestPermissions::HideRequest(
extension_info_map_.get(), sensitive_request.get(), nullptr));
}

Powered by Google App Engine
This is Rietveld 408576698