2011-12-03 09:18:38 -08:00
|
|
|
<!--
|
|
|
|
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++;
|
|
|
|
|
2012-06-29 09:48:35 -07:00
|
|
|
let request = indexedDB.open(name, 1);
|
2011-12-03 09:18:38 -08:00
|
|
|
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");
|
2013-07-10 14:52:35 -07:00
|
|
|
yield undefined;
|
2011-12-03 09:18:38 -08:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript;version=1.7" src="browserHelpers.js"></script>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body onload="runTest();" onunload="finishTestNow();"></body>
|
|
|
|
|
|
|
|
</html>
|