diff --git a/testing/web-platform/tests/clipboard-apis/data-transfer-file-list-change-reference-updates.html b/testing/web-platform/tests/clipboard-apis/data-transfer-file-list-change-reference-updates.html new file mode 100644 index 000000000000..89d2054abe7f --- /dev/null +++ b/testing/web-platform/tests/clipboard-apis/data-transfer-file-list-change-reference-updates.html @@ -0,0 +1,164 @@ +< +! +DOCTYPE +html +> +< +meta +charset += +utf +- +8 +> +< +title +> +Any +JS +reference +DataTransfer +. +files +should +contain +latest +changes +done +to +DataTransfer +. +items +< +/ +title +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +/ +script +> +< +input +type += +file +multiple +> +< +script +> +test +( +( +) += +> +{ +const +dt += +new +DataTransfer +( +) +; +const +filelist += +dt +. +files +; +assert_equals +( +filelist +. +length +0 +' +Initial +filelist +should +be +empty +' +) +; +dt +. +items +. +add +( +new +File +( +[ +0 +] +' +test +' +) +) +; +assert_equals +( +filelist +. +length +1 +' +Filelist +should +reflect +the +changes +done +to +items +' +) +; +} +' +expect +changed +contents +' +) +; +< +/ +script +>