Bug 183643

Summary: webkitdirectory-open-panel stumbles over unordered results
Product: WebKit Reporter: Keith Rollin <krollin>
Component: WebKit Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, commit-queue, rniwa, webkit-bug-importer, wenson_hsieh, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Keith Rollin 2018-03-14 13:36:36 PDT
After running fast/forms/file/entries-api/webkitdirectory-open-panel.html, .../OpenSource/WebKitBuild/Release/layout-test-results/fast/forms/file/entries-api/webkitdirectory-open-panel-actual.txt contains the results below. It looks like all of the expected results are there, but just not in the expected order.

========== Actual Results ==========

OPEN FILE PANEL
-> DIRECTORIES ARE ALLOWED
Tests choosing a folder via the file picker when using webkitdirectory.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS inputElement.webkitdirectory is true
PASS fileList.length is 5
FAIL fileList[0].name should be file1.txt. Was file2.txt.
FAIL fileList[0].webkitRelativePath should be testFiles/file1.txt. Was testFiles/file2.txt.
FAIL fileList[1].name should be file2.txt. Was file1.txt.
FAIL fileList[1].webkitRelativePath should be testFiles/file2.txt. Was testFiles/file1.txt.
FAIL fileList[2].name should be file3.txt. Was file4.txt.
FAIL fileList[2].webkitRelativePath should be testFiles/subfolder1/file3.txt. Was testFiles/subfolder2/file4.txt.
FAIL fileList[3].name should be file4.txt. Was file5.txt.
FAIL fileList[3].webkitRelativePath should be testFiles/subfolder2/file4.txt. Was testFiles/subfolder2/subfolder2a/file5.txt.
FAIL fileList[4].name should be file5.txt. Was file3.txt.
FAIL fileList[4].webkitRelativePath should be testFiles/subfolder2/subfolder2a/file5.txt. Was testFiles/subfolder1/file3.txt.
PASS successfullyParsed is true
Some tests failed.

TEST COMPLETE

========== Expected Results ==========

OPEN FILE PANEL
-> DIRECTORIES ARE ALLOWED
Tests choosing a folder via the file picker when using webkitdirectory.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS inputElement.webkitdirectory is true
PASS fileList.length is 5
PASS fileList[0].name is "file1.txt"
PASS fileList[0].webkitRelativePath is "testFiles/file1.txt"
PASS fileList[1].name is "file2.txt"
PASS fileList[1].webkitRelativePath is "testFiles/file2.txt"
PASS fileList[2].name is "file3.txt"
PASS fileList[2].webkitRelativePath is "testFiles/subfolder1/file3.txt"
PASS fileList[3].name is "file4.txt"
PASS fileList[3].webkitRelativePath is "testFiles/subfolder2/file4.txt"
PASS fileList[4].name is "file5.txt"
PASS fileList[4].webkitRelativePath is "testFiles/subfolder2/subfolder2a/file5.txt"
PASS successfullyParsed is true

TEST COMPLETE
Comment 1 Chris Dumez 2018-03-15 14:21:37 PDT
Created attachment 335883 [details]
Patch
Comment 2 WebKit Commit Bot 2018-03-15 15:12:14 PDT
Comment on attachment 335883 [details]
Patch

Clearing flags on attachment: 335883

Committed r229642: <https://trac.webkit.org/changeset/229642>
Comment 3 WebKit Commit Bot 2018-03-15 15:12:16 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2018-03-15 15:13:23 PDT
<rdar://problem/38518705>