4 <title>Test for bug
1319088</title>
5 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
10 <input id=
"input" type=
"file"></input>
12 <script type=
"application/javascript">
14 function testSetup() {
15 SpecialPowers.pushPrefEnv({
"set": [[
"dom.webkitBlink.dirPicker.enabled", true]]}, next);
18 function populateInputFile() {
19 var url = SimpleTest.getTestFileURL(
"script_fileList.js");
20 var script = SpecialPowers.loadChromeScript(url);
22 function onOpened(message) {
23 var input = document.getElementById(
"input");
24 SpecialPowers.wrap(input).mozSetFileArray([message.file]);
30 script.addMessageListener(
"file.opened", onOpened);
31 script.sendAsyncMessage(
"file.open");
35 var input = document.getElementById(
"input");
36 is(input.files[
0].webkitRelativePath,
"",
"No relative path!");
38 let form = document.createElement(
"form");
39 form.appendChild(input);
41 is(input.files[
0].webkitRelativePath,
"",
"No relative path!");
57 var test = tests.shift();
61 SimpleTest.waitForExplicitFinish();