Skip to content

Commit 2a3c4f1

Browse files
authored
Hide suggestedsavefilepath (#5664)
There's an open question regarding the design of SuggestedSaveFilePath during the official API review #5634 Hence hiding this property from preview release.
1 parent f045be5 commit 2a3c4f1

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

dev/Interop/StoragePickers/Microsoft.Windows.Storage.Pickers.idl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ namespace Microsoft.Windows.Storage.Pickers
5757
Windows.Foundation.Collections.IMap<String, Windows.Foundation.Collections.IVector<String> > FileTypeChoices{ get; };
5858
String DefaultFileExtension;
5959
String SuggestedFileName;
60-
String SuggestedSaveFilePath;
6160

6261
[remote_sync] Windows.Foundation.IAsyncOperation<PickFileResult> PickSaveFileAsync();
6362
}

test/StoragePickersTests/PickerCommonTests.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ namespace Test::PickerCommonTests
7979

8080
}
8181

82+
/*
8283
TEST_METHOD(VerifyConfigureFileSaveDialog_WhenSuggestedSaveFilePathFolderDeleted_ExpectItsFileNameStillWork)
8384
{
8485
// Arrange.
@@ -124,6 +125,7 @@ namespace Test::PickerCommonTests
124125
// Even the empty file name of SuggestedSaveFilePath takes precedence over SuggestedFileName.
125126
VERIFY_IS_NULL(dialogFileName, L"The save dialog's file name should be empty.");
126127
}
128+
*/
127129

128130
TEST_METHOD(VerifyFilters_FileOpenPickerWhenFileTypeFiltersDefinedExpectAddingUnionedType)
129131
{
@@ -277,6 +279,7 @@ namespace Test::PickerCommonTests
277279
VERIFY_ARE_EQUAL(L"MyFile1.txt", std::wstring(fileName.get()));
278280
}
279281

282+
/*
280283
TEST_METHOD(VerifyFileSaveDialog_SuggestedSaveFilePathTakesPrecedenceOverSuggestedFileName)
281284
{
282285
// Arrange.
@@ -299,6 +302,7 @@ namespace Test::PickerCommonTests
299302
dialog->GetFileName(fileName.put());
300303
VERIFY_ARE_EQUAL(L"MyFile2.txt", std::wstring(fileName.get()));
301304
}
305+
*/
302306

303307
TEST_METHOD(VerifyParseFolderItemAndFileName)
304308
{
@@ -601,6 +605,7 @@ namespace Test::PickerCommonTests
601605
}
602606
}
603607

608+
/*
604609
TEST_METHOD(VerifyValidateSuggestedSaveFilePath)
605610
{
606611
// Arrange.
@@ -644,6 +649,7 @@ namespace Test::PickerCommonTests
644649
}
645650
}
646651
}
652+
*/
647653

648654
std::vector<std::tuple<winrt::hstring, bool>> file_extension_validation_test_cases{
649655
{L".txt", true},

test/StoragePickersTests/StoragePickersTests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ namespace Test::StoragePickersTests
163163
picker.SuggestedStartLocation(winrt::Microsoft::Windows::Storage::Pickers::PickerLocationId::DocumentsLibrary);
164164
VERIFY_ARE_EQUAL(picker.SuggestedStartLocation(), winrt::Microsoft::Windows::Storage::Pickers::PickerLocationId::DocumentsLibrary);
165165

166-
std::filesystem::remove_all(L"C:\\temp_filesavepicker_ut_temp");
167-
picker.SuggestedSaveFilePath(L"C:\\temp_filesavepicker_ut_temp\\MyFile.txt");
168-
VERIFY_ARE_EQUAL(picker.SuggestedSaveFilePath(), L"C:\\temp_filesavepicker_ut_temp\\MyFile.txt");
166+
// std::filesystem::remove_all(L"C:\\temp_filesavepicker_ut_temp");
167+
// picker.SuggestedSaveFilePath(L"C:\\temp_filesavepicker_ut_temp\\MyFile.txt");
168+
// VERIFY_ARE_EQUAL(picker.SuggestedSaveFilePath(), L"C:\\temp_filesavepicker_ut_temp\\MyFile.txt");
169169

170170
picker.CommitButtonText(L"commit");
171171
VERIFY_ARE_EQUAL(picker.CommitButtonText(), L"commit");

0 commit comments

Comments
 (0)