Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
michael@0 | 1 | <!-- |
michael@0 | 2 | Any copyright is dedicated to the Public Domain. |
michael@0 | 3 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 4 | --> |
michael@0 | 5 | <html> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Indexed Database Test</title> |
michael@0 | 8 | |
michael@0 | 9 | <script type="text/javascript;version=1.7"> |
michael@0 | 10 | let db; |
michael@0 | 11 | let i = 0; |
michael@0 | 12 | |
michael@0 | 13 | function onAddMore() { |
michael@0 | 14 | const name = window.location.pathname + i++; |
michael@0 | 15 | |
michael@0 | 16 | let request = indexedDB.open(name, 1); |
michael@0 | 17 | request.onerror = errorHandler; |
michael@0 | 18 | request.onsuccess = grabEventAndContinueHandler; |
michael@0 | 19 | |
michael@0 | 20 | request.onsuccess = function(event) { |
michael@0 | 21 | setTimeout(testFinishedCallback, 0, "complete"); |
michael@0 | 22 | } |
michael@0 | 23 | request.onerror = function(event) { |
michael@0 | 24 | setTimeout(testFinishedCallback, 0, "abort"); |
michael@0 | 25 | } |
michael@0 | 26 | } |
michael@0 | 27 | |
michael@0 | 28 | function onDone() { |
michael@0 | 29 | window.removeEventListener("indexedDB-addMore", onAddMore, true); |
michael@0 | 30 | window.removeEventListener("indexedDB-done", onDone, true); |
michael@0 | 31 | |
michael@0 | 32 | testResult = "finished"; |
michael@0 | 33 | testException = undefined; |
michael@0 | 34 | finishTest(); |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | function testSteps() |
michael@0 | 38 | { |
michael@0 | 39 | window.addEventListener("indexedDB-addMore", onAddMore, true); |
michael@0 | 40 | window.addEventListener("indexedDB-done", onDone, true); |
michael@0 | 41 | |
michael@0 | 42 | setTimeout(testFinishedCallback, 0, "ready"); |
michael@0 | 43 | yield undefined; |
michael@0 | 44 | } |
michael@0 | 45 | </script> |
michael@0 | 46 | |
michael@0 | 47 | <script type="text/javascript;version=1.7" src="browserHelpers.js"></script> |
michael@0 | 48 | |
michael@0 | 49 | </head> |
michael@0 | 50 | |
michael@0 | 51 | <body onload="runTest();" onunload="finishTestNow();"></body> |
michael@0 | 52 | |
michael@0 | 53 | </html> |