| Index: chrome/browser/ui/chrome_select_file_policy_unittest.cc
|
| diff --git a/chrome/browser/ui/select_file_dialog_unittest.cc b/chrome/browser/ui/chrome_select_file_policy_unittest.cc
|
| similarity index 91%
|
| rename from chrome/browser/ui/select_file_dialog_unittest.cc
|
| rename to chrome/browser/ui/chrome_select_file_policy_unittest.cc
|
| index 07bca44bccbf0c6d01c020b8594a3c17df8ac131..8056d6c569af3edeba648db3bfe18a1e9d8b8a12 100644
|
| --- a/chrome/browser/ui/select_file_dialog_unittest.cc
|
| +++ b/chrome/browser/ui/chrome_select_file_policy_unittest.cc
|
| @@ -2,6 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "chrome/browser/ui/chrome_select_file_policy.h"
|
| +
|
| #include "base/file_path.h"
|
| #include "base/file_util.h"
|
| #include "base/message_loop.h"
|
| @@ -27,6 +29,8 @@
|
|
|
| using content::BrowserThread;
|
|
|
| +namespace {
|
| +
|
| class FileSelectionUser : public SelectFileDialog::Listener {
|
| public:
|
| FileSelectionUser()
|
| @@ -40,7 +44,8 @@ class FileSelectionUser : public SelectFileDialog::Listener {
|
|
|
| void StartFileSelection() {
|
| CHECK(!select_file_dialog_.get());
|
| - select_file_dialog_ = SelectFileDialog::Create(this);
|
| + select_file_dialog_ = SelectFileDialog::Create(
|
| + this, new ChromeSelectFilePolicy(NULL));
|
|
|
| const FilePath file_path;
|
| const string16 title=string16();
|
| @@ -53,7 +58,6 @@ class FileSelectionUser : public SelectFileDialog::Listener {
|
| 0,
|
| FILE_PATH_LITERAL(""),
|
| NULL,
|
| - NULL,
|
| NULL);
|
| file_selection_initialisation_in_progress = false;
|
| }
|
| @@ -78,11 +82,13 @@ class FileSelectionUser : public SelectFileDialog::Listener {
|
| bool file_selection_initialisation_in_progress;
|
| };
|
|
|
| -typedef testing::Test FileSelectionDialogTest;
|
| +} // namespace
|
| +
|
| +typedef testing::Test ChromeSelectFilePolicyTest;
|
|
|
| // Tests if SelectFileDialog::SelectFile returns asynchronously with
|
| // file-selection dialogs disabled by policy.
|
| -TEST_F(FileSelectionDialogTest, MAYBE_ExpectAsynchronousListenerCall) {
|
| +TEST_F(ChromeSelectFilePolicyTest, MAYBE_ExpectAsynchronousListenerCall) {
|
| MessageLoopForUI message_loop;
|
| content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop);
|
|
|
|
|