Index: third_party/WebKit/LayoutTests/storage/websql/transaction-removed-context-crash.html |
diff --git a/third_party/WebKit/LayoutTests/storage/websql/transaction-removed-context-crash.html b/third_party/WebKit/LayoutTests/storage/websql/transaction-removed-context-crash.html |
index 425b665a490d7345a432b96b1aed2cf6dbcf7c79..676ef5093c023ffea082d1a036ca251a9a64b3fc 100644 |
--- a/third_party/WebKit/LayoutTests/storage/websql/transaction-removed-context-crash.html |
+++ b/third_party/WebKit/LayoutTests/storage/websql/transaction-removed-context-crash.html |
@@ -2,8 +2,8 @@ |
<title>Transaction from removed execution context</title> |
<script> |
if (window.testRunner) { |
- testRunner.dumpAsText(); |
- testRunner.waitUntilDone(); |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
} |
var script = ` |
@@ -12,31 +12,29 @@ db.transaction(tx => { |
tx.executeSql('DROP TABLE IF EXISTS TestTable'); |
tx.executeSql('CREATE TABLE IF NOT EXISTS TestTable (id unique,text)'); |
tx.executeSql('DELETE FROM TestTable WHERE id=?', [1]); |
- frameElement.parentNode.removeChild(frameElement); |
+ frameElement.remove(); |
}); |
`; |
window.addEventListener('DOMContentLoaded', e => { |
- var blob = new Blob(['<script>' + script + '<\/script>'], {'type': 'text/html'}); |
- var iframe = document.createElement('iframe'); |
- document.body.appendChild(iframe); |
- iframe.src = URL.createObjectURL(blob); |
- if (window.testRunner) { |
- waitUntil( |
- () => iframe.parentNode === null, |
- () => testRunner.notifyDone() |
- ); |
- } |
+ var srcdoc = '<script>' + script + '<\/script>'; |
+ var iframe = document.createElement('iframe'); |
+ document.body.appendChild(iframe); |
+ iframe.srcdoc = srcdoc; |
+ waitUntil( |
+ () => iframe.parentNode === null, |
+ () => window.testRunner && testRunner.notifyDone() |
+ ); |
}); |
// Poll (10ms) until testFunc returns true, then execute callback(). |
function waitUntil(testFunc, callback) { |
- setTimeout(() => { |
- if (testFunc()) |
- callback(); |
- else |
- waitUntil(testFunc, callback); |
- }, 10); |
+ setTimeout(() => { |
+ if (testFunc()) |
+ callback(); |
+ else |
+ waitUntil(testFunc, callback); |
+ }, 10); |
} |
</script> |
<body> |