summaryrefslogtreecommitdiffstats
path: root/dom/fs/test/crashtests
diff options
context:
space:
mode:
Diffstat (limited to 'dom/fs/test/crashtests')
-rw-r--r--dom/fs/test/crashtests/1874334-2.html8
-rw-r--r--dom/fs/test/crashtests/1874334.html16
-rw-r--r--dom/fs/test/crashtests/crashtests.list3
-rw-r--r--dom/fs/test/crashtests/sw1874334-2.js12
4 files changed, 39 insertions, 0 deletions
diff --git a/dom/fs/test/crashtests/1874334-2.html b/dom/fs/test/crashtests/1874334-2.html
new file mode 100644
index 0000000000..3d30d7496f
--- /dev/null
+++ b/dom/fs/test/crashtests/1874334-2.html
@@ -0,0 +1,8 @@
+<script>
+document.addEventListener("DOMContentLoaded", async () => {
+ await self.navigator.serviceWorker.register("sw1874334-2.js?318", { })
+ await self.navigator.serviceWorker.register("sw1874334-2.js?363", { })
+ await self.navigator.serviceWorker.register("sw1874334-2.js?87", { })
+ await self.fetch("missing", {"headers": []})
+})
+</script>
diff --git a/dom/fs/test/crashtests/1874334.html b/dom/fs/test/crashtests/1874334.html
new file mode 100644
index 0000000000..590025a60f
--- /dev/null
+++ b/dom/fs/test/crashtests/1874334.html
@@ -0,0 +1,16 @@
+<script>
+
+async function stuff() {
+ let arr = new ArrayBuffer(500000);
+ let blob = new Blob([arr]);
+ let file = new File([blob], "", { });
+
+ let dir = await self.navigator.storage.getDirectory();
+ let handle = await dir.getFileHandle("514600c6-596b-4676-ab0c-3e6f1e86759f", {"create": true});
+ let wfs = await handle.createWritable({"keepExistingData": true});
+
+ await file.stream().pipeTo(wfs);
+};
+
+document.addEventListener("DOMContentLoaded", stuff);
+</script>
diff --git a/dom/fs/test/crashtests/crashtests.list b/dom/fs/test/crashtests/crashtests.list
index a083cb80b2..c5130c4232 100644
--- a/dom/fs/test/crashtests/crashtests.list
+++ b/dom/fs/test/crashtests/crashtests.list
@@ -1,6 +1,7 @@
# StorageManager isn't enabled on Android
defaults skip-if(Android) pref(dom.fs.enabled,true) pref(dom.fs.writable_file_stream.enabled,true)
+# Most of the issues here are reproducible only with --verify
load 1798773.html
load 1800470.html
load 1809759.html
@@ -8,3 +9,5 @@ load 1816710.html
load 1841702.html
HTTP load 1844619.html
HTTP load 1858820.html
+load 1874334.html
+HTTP load 1874334-2.html
diff --git a/dom/fs/test/crashtests/sw1874334-2.js b/dom/fs/test/crashtests/sw1874334-2.js
new file mode 100644
index 0000000000..59d82ebaaa
--- /dev/null
+++ b/dom/fs/test/crashtests/sw1874334-2.js
@@ -0,0 +1,12 @@
+(async () => {
+ let arr = new ArrayBuffer(43109)
+ let blob = new Blob([arr, arr, arr, arr, arr])
+ let req = new Request("missing", {"headers": []})
+ let dir = await self.navigator.storage.getDirectory()
+ let file = new File([blob, arr], "", { })
+ let handle = await dir.getFileHandle("514600c6-596b-4676-ab0c-3e6f1e86759f", {"create": true})
+ let wfs = await handle.createWritable({"keepExistingData": true})
+ await handle.createWritable({"keepExistingData": true})
+ try { await req.json(arr, {"headers": []}) } catch (e) {}
+ try { await file.stream().pipeTo(wfs, { }) } catch (e) {}
+})()