summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui/downloads_ui_browsertest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/webui/downloads_ui_browsertest.cc')
-rw-r--r--chrome/browser/ui/webui/downloads_ui_browsertest.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/ui/webui/downloads_ui_browsertest.cc b/chrome/browser/ui/webui/downloads_ui_browsertest.cc
index 7c6434b..1abeb5e 100644
--- a/chrome/browser/ui/webui/downloads_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/downloads_ui_browsertest.cc
@@ -5,9 +5,12 @@
#include "chrome/browser/ui/webui/downloads_ui_browsertest.h"
#include "base/prefs/pref_service.h"
+#include "chrome/browser/managed_mode/managed_user_service.h"
+#include "chrome/browser/managed_mode/managed_user_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/pref_names.h"
+#include "content/public/test/test_utils.h"
DownloadsUIBrowserTest::DownloadsUIBrowserTest() {
}
@@ -19,3 +22,9 @@ void DownloadsUIBrowserTest::SetDeleteAllowed(bool allowed) {
browser()->profile()->GetPrefs()->
SetBoolean(prefs::kAllowDeletingBrowserHistory, allowed);
}
+
+void DownloadsUIBrowserTest::ChangeProfileToSupervised() {
+ ManagedUserServiceFactory::GetForProfile(
+ browser()->profile())->InitForTesting();
+ content::RunAllPendingInMessageLoop();
+}