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

Unified Diff: chrome/test/base/in_process_browser_test.cc

Issue 2913733002: Add a browser test for access control for file: scheme (Closed)
Patch Set: Rework the patch per feedback Created 3 years, 6 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
« chrome/browser/net/errorpage_test_util.cc ('K') | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/in_process_browser_test.cc
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index 73c2156714d0a9508faf0360fe7aed91ccb23e8d..2f05f668a490bc1563ed31451a4e6588ac23cc0c 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -27,6 +27,7 @@
#include "chrome/browser/devtools/devtools_window.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/lifetime/termination_notification.h"
+#include "chrome/browser/net/chrome_network_delegate.h"
#include "chrome/browser/net/net_error_tab_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -255,6 +256,9 @@ void InProcessBrowserTest::SetUp() {
// Polymer Elements are used for quick unlock configuration in options page,
// which is chromeos specific feature.
options::BrowserOptionsHandler::DisablePolymerPreloadForTesting();
+ // browser_tests and interactive_ui_tests rely on the ability to open any
+ // files via file: scheme.
+ ChromeNetworkDelegate::EnableAccessToAllFilesForTesting(true);
#endif // defined(OS_CHROMEOS)
// Use hardcoded quota settings to have a consistent testing environment.
« chrome/browser/net/errorpage_test_util.cc ('K') | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698