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

Side by Side Diff: chrome/browser/ui/chrome_select_file_policy_unittest.cc

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 bool file_selection_initialisation_in_progress; 82 bool file_selection_initialisation_in_progress;
83 }; 83 };
84 84
85 } // namespace 85 } // namespace
86 86
87 typedef testing::Test ChromeSelectFilePolicyTest; 87 typedef testing::Test ChromeSelectFilePolicyTest;
88 88
89 // Tests if SelectFileDialog::SelectFile returns asynchronously with 89 // Tests if SelectFileDialog::SelectFile returns asynchronously with
90 // file-selection dialogs disabled by policy. 90 // file-selection dialogs disabled by policy.
91 TEST_F(ChromeSelectFilePolicyTest, MAYBE_ExpectAsynchronousListenerCall) { 91 TEST_F(ChromeSelectFilePolicyTest, MAYBE_ExpectAsynchronousListenerCall) {
92 MessageLoopForUI message_loop; 92 base::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 TestingBrowserProcess::GetGlobal()); 96 TestingBrowserProcess::GetGlobal());
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(prefs::kAllowFileSelectionDialogs, 101 local_state.Get()->SetManagedPref(prefs::kAllowFileSelectionDialogs,
102 new base::FundamentalValue(false)); 102 new base::FundamentalValue(false));
103 103
104 file_selection_user->StartFileSelection(); 104 file_selection_user->StartFileSelection();
105 } 105 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_tab_strip_model_delegate.cc ('k') | chrome/browser/ui/cocoa/about_ipc_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698