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

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: just rebase 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
« no previous file with comments | « chrome/test/BUILD.gn ('k') | content/public/test/test_navigation_observer.h » ('j') | 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 62290f2a8d804630a4069b980f6d2ec3cbde76a2..5b534919f297435350f1790d2ded684c7af5f2c5 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -26,6 +26,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"
@@ -254,6 +255,10 @@ void InProcessBrowserTest::SetUp() {
// Polymer Elements are used for quick unlock configuration in options page,
// which is chromeos specific feature.
options::BrowserOptionsHandler::DisablePolymerPreloadForTesting();
+ // On Chrome OS, access to files via file: scheme is restricted. Enable
+ // access to all files here since 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.
« no previous file with comments | « chrome/test/BUILD.gn ('k') | content/public/test/test_navigation_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698