summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-11-24 17:06:39 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-11-24 17:06:39 +0100
commit1f36fcbb30ae279bc644aeec3a19101c2a2871b0 (patch)
tree20502d5c4122737053298f07ca7826fea82ba0a6 /dom
parent21fdc3e93ab2d4361a58b9b66e62a8ef1b3e0f5c (diff)
downloadUXP-1f36fcbb30ae279bc644aeec3a19101c2a2871b0.tar
UXP-1f36fcbb30ae279bc644aeec3a19101c2a2871b0.tar.gz
UXP-1f36fcbb30ae279bc644aeec3a19101c2a2871b0.tar.lz
UXP-1f36fcbb30ae279bc644aeec3a19101c2a2871b0.tar.xz
UXP-1f36fcbb30ae279bc644aeec3a19101c2a2871b0.zip
Add crashtest for resolved bug 1558522.
Diffstat (limited to 'dom')
-rw-r--r--dom/indexedDB/crashtests/1558522-1.html40
-rw-r--r--dom/indexedDB/crashtests/crashtests.list1
2 files changed, 41 insertions, 0 deletions
diff --git a/dom/indexedDB/crashtests/1558522-1.html b/dom/indexedDB/crashtests/1558522-1.html
new file mode 100644
index 000000000..47dd2f843
--- /dev/null
+++ b/dom/indexedDB/crashtests/1558522-1.html
@@ -0,0 +1,40 @@
+<html>
+<head>
+ <script id='worker' type='javascript/worker'>
+ onmessage = function (e) {
+ const file = e.data[0]
+ const db = indexedDB.open('', {})
+ db.onupgradeneeded = function (event) {
+ const store = event.target.result.createObjectStore('IDBStore_0', {})
+ store.add({}, '')
+ }
+ db.onsuccess = function (event) {
+ const transaction = event.target.result.transaction('IDBStore_0', 'readwrite')
+ const store = transaction.objectStore('IDBStore_0')
+ const cursor = store.openCursor()
+ cursor.onsuccess = function (event) {
+ event.target.result.update({
+ data: file
+ })
+ event.target.result.advance(1)
+ }
+
+ event.target.result.close()
+ }
+ }
+
+ </script>
+ <script>
+ let worker;
+
+ function start () {
+ const file = new File([], 'x')
+ const blob = new Blob([document.getElementById('worker').textContent], { type: 'text/javascript' })
+ worker = new Worker(window.URL.createObjectURL(blob))
+ worker.postMessage([file], [])
+ }
+
+ document.addEventListener('DOMContentLoaded', start)
+ </script>
+</head>
+</html> \ No newline at end of file
diff --git a/dom/indexedDB/crashtests/crashtests.list b/dom/indexedDB/crashtests/crashtests.list
index 69f5dab0b..ead6024dc 100644
--- a/dom/indexedDB/crashtests/crashtests.list
+++ b/dom/indexedDB/crashtests/crashtests.list
@@ -1 +1,2 @@
load 726376-1.html
+load 1558522-1.html