Bug 1973726 - Set DOM file path for webkitRelativePath. r=sefeng,geckoview-reviewers,webidl,smaug,ohall
Actually, there is no way to set webkitRelativePath from JavaScript.
Since GeckoView's folder picker handles virtual file data, we need to
set relative path from JavaScript directly.
A content URI of System storage document provider only allow file data
access from file/folder picker, so there is no way to test it on
geckoivew-junit.
Also, after landing bug 1591640, GVE always crash when using folder
picker. So this includes a fix for it.
Differential Revision: https://phabricator.services.mozilla.com/D255615
<!DOCTYPE html><metacharset="utf-8"><title>TestDriver actions: element position</title><scriptsrc="/resources/testharness.js"></script><scriptsrc="/resources/testharnessreport.js"></script><scriptsrc="/resources/testdriver.js"></script><scriptsrc="/resources/testdriver-actions.js"></script><scriptsrc="/resources/testdriver-vendor.js"></script><style>div#test{position:fixed;left:-100px;top:-25px;width:200px;height:75px;background-color:blue;}</style><divid="test"></div><script>letevents=[];async_test(t=>{lettest=document.getElementById("test");test.addEventListener("click",e=>{events.push(e.clientX);events.push(e.clientY)});letdiv=document.getElementById("test");letactions=newtest_driver.Actions().pointerMove(0,0,{origin:test}).pointerDown().pointerUp().send().then(t.step_func_done(()=>assert_array_equals(events,[50,25]))).catch(e=>t.step_func(()=>assert_unreached("Actions sequence failed "+e)));});</script>