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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « chrome/browser/ui/chrome_pages.cc ('k') | chrome/browser/ui/cocoa/accelerators_cocoa.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // Tests if SelectFileDialog::SelectFile returns asynchronously with 88 // Tests if SelectFileDialog::SelectFile returns asynchronously with
89 // file-selection dialogs disabled by policy. 89 // file-selection dialogs disabled by policy.
90 TEST_F(ChromeSelectFilePolicyTest, MAYBE_ExpectAsynchronousListenerCall) { 90 TEST_F(ChromeSelectFilePolicyTest, MAYBE_ExpectAsynchronousListenerCall) {
91 base::MessageLoopForUI message_loop; 91 base::MessageLoopForUI message_loop;
92 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); 92 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop);
93 93
94 ScopedTestingLocalState local_state( 94 ScopedTestingLocalState local_state(
95 TestingBrowserProcess::GetGlobal()); 95 TestingBrowserProcess::GetGlobal());
96 96
97 scoped_ptr<FileSelectionUser> file_selection_user(new FileSelectionUser()); 97 std::unique_ptr<FileSelectionUser> file_selection_user(
98 new FileSelectionUser());
98 99
99 // Disallow file-selection dialogs. 100 // Disallow file-selection dialogs.
100 local_state.Get()->SetManagedPref(prefs::kAllowFileSelectionDialogs, 101 local_state.Get()->SetManagedPref(prefs::kAllowFileSelectionDialogs,
101 new base::FundamentalValue(false)); 102 new base::FundamentalValue(false));
102 103
103 file_selection_user->StartFileSelection(); 104 file_selection_user->StartFileSelection();
104 } 105 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/chrome_pages.cc ('k') | chrome/browser/ui/cocoa/accelerators_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698