| OLD | NEW |
| 1 // original test: | 1 // original test: |
| 2 // http://mxr.mozilla.org/mozilla2.0/source/dom/indexedDB/test/test_add_twice_fa
ilure.html | 2 // http://mxr.mozilla.org/mozilla2.0/source/dom/indexedDB/test/test_add_twice_fa
ilure.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 behavior adding the same property twice"); | 12 description("Test IndexedDB behavior adding the same property twice"); |
| 13 | 13 |
| 14 indexedDBTest(prepareDatabase); | 14 indexedDBTest(prepareDatabase); |
| 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 12 matching lines...) Expand all Loading... |
| 31 request.onsuccess = unexpectedSuccessCallback; | 31 request.onsuccess = unexpectedSuccessCallback; |
| 32 request.onerror = addSecondExpectedError; | 32 request.onerror = addSecondExpectedError; |
| 33 } | 33 } |
| 34 | 34 |
| 35 function addSecondExpectedError() | 35 function addSecondExpectedError() |
| 36 { | 36 { |
| 37 shouldBe("event.target.error.name", "'ConstraintError'"); | 37 shouldBe("event.target.error.name", "'ConstraintError'"); |
| 38 event.preventDefault(); | 38 event.preventDefault(); |
| 39 finishJSTest(); | 39 finishJSTest(); |
| 40 } | 40 } |
| OLD | NEW |