Skip to content

Commit

Permalink
webkitdirectory-open-panel stumbles over unordered results
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=183643

Reviewed by Wenson Hsieh.

Update fast/forms/file/entries-api/webkitdirectory-open-panel.html to not rely on a
specific file ordering when checking input.files.

* fast/forms/file/entries-api/webkitdirectory-open-panel-expected.txt:
* fast/forms/file/entries-api/webkitdirectory-open-panel.html:


Canonical link: https://commits.webkit.org/199317@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
cdumez committed Mar 15, 2018
1 parent 032e563 commit 2276bfa
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 20 deletions.
13 changes: 13 additions & 0 deletions LayoutTests/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
2018-03-15 Chris Dumez <cdumez@apple.com>

webkitdirectory-open-panel stumbles over unordered results
https://bugs.webkit.org/show_bug.cgi?id=183643

Reviewed by Wenson Hsieh.

Update fast/forms/file/entries-api/webkitdirectory-open-panel.html to not rely on a
specific file ordering when checking input.files.

* fast/forms/file/entries-api/webkitdirectory-open-panel-expected.txt:
* fast/forms/file/entries-api/webkitdirectory-open-panel.html:

2018-03-15 Youenn Fablet <youenn@apple.com>

Layout Test http/wpt/service-workers/update-service-worker.https.html is flaky
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ 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 fileList contains file file1.txt
PASS file.webkitRelativePath is "testFiles/file1.txt"
PASS fileList contains file file2.txt
PASS file.webkitRelativePath is "testFiles/file2.txt"
PASS fileList contains file file3.txt
PASS file.webkitRelativePath is "testFiles/subfolder1/file3.txt"
PASS fileList contains file file4.txt
PASS file.webkitRelativePath is "testFiles/subfolder2/file4.txt"
PASS fileList contains file file5.txt
PASS file.webkitRelativePath is "testFiles/subfolder2/subfolder2a/file5.txt"
PASS successfullyParsed is true

TEST COMPLETE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,28 @@
inputElement.offsetTop + inputElement.offsetHeight / 2);
}

function checkFileListIncludes(files, name, relativePath)
{
for (let _file of files) {
file = _file;
if (file.name === name) {
testPassed("fileList contains file " + name);
shouldBeEqualToString("file.webkitRelativePath", "" + relativePath);
return;
}
}
testFailed("fileList does not contain file " + name);
}

function changed(event)
{
fileList = event.target.files;
shouldBe("fileList.length", "5");
shouldBeEqualToString("fileList[0].name", "file1.txt");
shouldBeEqualToString("fileList[0].webkitRelativePath", "testFiles/file1.txt");
shouldBeEqualToString("fileList[1].name", "file2.txt");
shouldBeEqualToString("fileList[1].webkitRelativePath", "testFiles/file2.txt");
shouldBeEqualToString("fileList[2].name", "file3.txt");
shouldBeEqualToString("fileList[2].webkitRelativePath", "testFiles/subfolder1/file3.txt");
shouldBeEqualToString("fileList[3].name", "file4.txt");
shouldBeEqualToString("fileList[3].webkitRelativePath", "testFiles/subfolder2/file4.txt");
shouldBeEqualToString("fileList[4].name", "file5.txt");
shouldBeEqualToString("fileList[4].webkitRelativePath", "testFiles/subfolder2/subfolder2a/file5.txt");
checkFileListIncludes(fileList, "file1.txt", "testFiles/file1.txt");
checkFileListIncludes(fileList, "file2.txt", "testFiles/file2.txt");
checkFileListIncludes(fileList, "file3.txt", "testFiles/subfolder1/file3.txt");
checkFileListIncludes(fileList, "file4.txt", "testFiles/subfolder2/file4.txt");
checkFileListIncludes(fileList, "file5.txt", "testFiles/subfolder2/subfolder2a/file5.txt");

finishJSTest();
}
Expand Down

0 comments on commit 2276bfa

Please sign in to comment.