OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/string16.h" | 7 #include "base/string16.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/browser/prefs/browser_prefs.h" | 10 #include "chrome/browser/prefs/browser_prefs.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // file-selection dialogs disabled by policy. | 72 // file-selection dialogs disabled by policy. |
73 TEST_F(FileSelectionDialogTest, ExpectAsynchronousListenerCall) { | 73 TEST_F(FileSelectionDialogTest, ExpectAsynchronousListenerCall) { |
74 MessageLoopForUI message_loop; | 74 MessageLoopForUI message_loop; |
75 BrowserThread ui_thread(BrowserThread::UI, &message_loop); | 75 BrowserThread ui_thread(BrowserThread::UI, &message_loop); |
76 | 76 |
77 ScopedTestingLocalState local_state_(testing_browser_process_.get()); | 77 ScopedTestingLocalState local_state_(testing_browser_process_.get()); |
78 | 78 |
79 scoped_ptr<FileSelectionUser> file_selection_user(new FileSelectionUser()); | 79 scoped_ptr<FileSelectionUser> file_selection_user(new FileSelectionUser()); |
80 | 80 |
81 // Disallow file-selection dialogs. | 81 // Disallow file-selection dialogs. |
82 local_state_.Get()->SetManagedPref( | 82 local_state_.Get()->SetManagedPref(prefs::kAllowFileSelectionDialogs, |
83 prefs::kAllowFileSelectionDialogs, | 83 base::FalseValue()); |
84 Value::CreateBooleanValue(false)); | |
85 | 84 |
86 file_selection_user->StartFileSelection(); | 85 file_selection_user->StartFileSelection(); |
87 } | 86 } |
OLD | NEW |