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

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: Address comments 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
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
sky 2017/06/06 17:18:26 How come you are only enabling this on chromeos?
mmenke1 2017/06/06 17:23:41 Only on ChromeOS (And Android) do we restrict what
sky 2017/06/06 20:45:36 Please update the comment to indicate this then.
satorux1 2017/06/07 08:00:38 Done.
+ // files via file: scheme.
+ ChromeNetworkDelegate::EnableAccessToAllFilesForTesting(true);
#endif // defined(OS_CHROMEOS)
// Use hardcoded quota settings to have a consistent testing environment.

Powered by Google App Engine
This is Rietveld 408576698