mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 20:47:44 +00:00
54 lines
1.4 KiB
HTML
54 lines
1.4 KiB
HTML
<!--
|
|
Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/
|
|
-->
|
|
<html>
|
|
<head>
|
|
<title>Indexed Database Test</title>
|
|
|
|
<script type="text/javascript;version=1.7">
|
|
let db;
|
|
let i = 0;
|
|
|
|
function onAddMore() {
|
|
const name = window.location.pathname + i++;
|
|
|
|
let request = indexedDB.open(name, 1);
|
|
request.onerror = errorHandler;
|
|
request.onsuccess = grabEventAndContinueHandler;
|
|
|
|
request.onsuccess = function(event) {
|
|
setTimeout(testFinishedCallback, 0, "complete");
|
|
}
|
|
request.onerror = function(event) {
|
|
setTimeout(testFinishedCallback, 0, "abort");
|
|
}
|
|
}
|
|
|
|
function onDone() {
|
|
window.removeEventListener("indexedDB-addMore", onAddMore, true);
|
|
window.removeEventListener("indexedDB-done", onDone, true);
|
|
|
|
testResult = "finished";
|
|
testException = undefined;
|
|
finishTest();
|
|
}
|
|
|
|
function testSteps()
|
|
{
|
|
window.addEventListener("indexedDB-addMore", onAddMore, true);
|
|
window.addEventListener("indexedDB-done", onDone, true);
|
|
|
|
setTimeout(testFinishedCallback, 0, "ready");
|
|
yield undefined;
|
|
}
|
|
</script>
|
|
|
|
<script type="text/javascript;version=1.7" src="browserHelpers.js"></script>
|
|
|
|
</head>
|
|
|
|
<body onload="runTest();" onunload="finishTestNow();"></body>
|
|
|
|
</html>
|