• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "chrome/browser/ui/webui/downloads_ui_browsertest.h"
6 
7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/supervised_user/supervised_user_service.h"
11 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/common/chrome_switches.h"
14 #include "chrome/common/pref_names.h"
15 #include "content/public/test/test_utils.h"
16 
DownloadsUIBrowserTest()17 DownloadsUIBrowserTest::DownloadsUIBrowserTest() {}
18 
~DownloadsUIBrowserTest()19 DownloadsUIBrowserTest::~DownloadsUIBrowserTest() {}
20 
SetDeleteAllowed(bool allowed)21 void DownloadsUIBrowserTest::SetDeleteAllowed(bool allowed) {
22   browser()->profile()->GetPrefs()->
23       SetBoolean(prefs::kAllowDeletingBrowserHistory, allowed);
24 }
25 
SetUpCommandLine(CommandLine * command_line)26 void DownloadsWebUIForSupervisedUsersTest::SetUpCommandLine(
27     CommandLine* command_line) {
28   command_line->AppendSwitchASCII(switches::kSupervisedUserId, "asdf");
29 }
30