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

Unified Diff: chrome/browser/ui/chrome_select_file_policy_unittest.cc

Issue 10667026: Start consolidating cross-port file selection code into ui/base/dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix win Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/chrome_select_file_policy.cc ('k') | chrome/browser/ui/cocoa/select_file_dialog_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/ui/chrome_select_file_policy.cc ('k') | chrome/browser/ui/cocoa/select_file_dialog_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698