OLD | NEW |
1 // original test: | 1 // original test: |
2 // http://mxr.mozilla.org/mozilla2.0/source/dom/indexedDB/test/test_clear.html | 2 // http://mxr.mozilla.org/mozilla2.0/source/dom/indexedDB/test/test_clear.html |
3 // license of original test: | 3 // license of original test: |
4 // " Any copyright is dedicated to the Public Domain. | 4 // " Any copyright is dedicated to the Public Domain. |
5 // http://creativecommons.org/publicdomain/zero/1.0/ " | 5 // http://creativecommons.org/publicdomain/zero/1.0/ " |
6 | 6 |
7 if (this.importScripts) { | 7 if (this.importScripts) { |
8 importScripts('../../../../fast/js/resources/js-test-pre.js'); | 8 importScripts('../../../../resources/js-test.js'); |
9 importScripts('../../resources/shared.js'); | 9 importScripts('../../resources/shared.js'); |
10 } | 10 } |
11 | 11 |
12 description("Test IndexedDB's clearing an object store"); | 12 description("Test IndexedDB's clearing an object store"); |
13 | 13 |
14 indexedDBTest(prepareDatabase, clear); | 14 indexedDBTest(prepareDatabase, clear); |
15 function prepareDatabase() | 15 function prepareDatabase() |
16 { | 16 { |
17 db = event.target.result; | 17 db = event.target.result; |
18 event.target.transaction.onabort = unexpectedAbortCallback; | 18 event.target.transaction.onabort = unexpectedAbortCallback; |
(...skipping 17 matching lines...) Expand all Loading... |
36 request.onsuccess = areWeClearYet; | 36 request.onsuccess = areWeClearYet; |
37 request.onerror = unexpectedErrorCallback; | 37 request.onerror = unexpectedErrorCallback; |
38 } | 38 } |
39 | 39 |
40 function areWeClearYet() | 40 function areWeClearYet() |
41 { | 41 { |
42 cursor = evalAndLog("cursor = request.result;"); | 42 cursor = evalAndLog("cursor = request.result;"); |
43 shouldBe("cursor", "null"); | 43 shouldBe("cursor", "null"); |
44 finishJSTest(); | 44 finishJSTest(); |
45 } | 45 } |
OLD | NEW |