OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/chrome_select_file_policy.h" | 5 #include "chrome/browser/ui/chrome_select_file_policy.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 TEST_F(ChromeSelectFilePolicyTest, MAYBE_ExpectAsynchronousListenerCall) { | 91 TEST_F(ChromeSelectFilePolicyTest, MAYBE_ExpectAsynchronousListenerCall) { |
92 MessageLoopForUI message_loop; | 92 MessageLoopForUI message_loop; |
93 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); | 93 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); |
94 | 94 |
95 ScopedTestingLocalState local_state( | 95 ScopedTestingLocalState local_state( |
96 static_cast<TestingBrowserProcess*>(g_browser_process)); | 96 static_cast<TestingBrowserProcess*>(g_browser_process)); |
97 | 97 |
98 scoped_ptr<FileSelectionUser> file_selection_user(new FileSelectionUser()); | 98 scoped_ptr<FileSelectionUser> file_selection_user(new FileSelectionUser()); |
99 | 99 |
100 // Disallow file-selection dialogs. | 100 // Disallow file-selection dialogs. |
101 local_state.Get()->SetManagedPref( | 101 local_state.Get()->SetManagedPref(prefs::kAllowFileSelectionDialogs, |
102 prefs::kAllowFileSelectionDialogs, | 102 new base::FundamentalValue(false)); |
103 Value::CreateBooleanValue(false)); | |
104 | 103 |
105 file_selection_user->StartFileSelection(); | 104 file_selection_user->StartFileSelection(); |
106 } | 105 } |
OLD | NEW |