OLD | NEW |
1 if (this.importScripts) { | 1 if (this.importScripts) { |
2 importScripts('../../../resources/js-test.js'); | 2 importScripts('../../../resources/js-test.js'); |
3 importScripts('shared.js'); | 3 importScripts('shared.js'); |
4 } | 4 } |
5 | 5 |
6 description("Test that an abort in the initial upgradeneeded sets version back t
o 0"); | 6 description("Test that an abort in the initial upgradeneeded sets version back t
o 0"); |
7 | 7 |
8 function test() | 8 function test() |
9 { | 9 { |
10 removeVendorPrefixes(); | 10 removeVendorPrefixes(); |
(...skipping 26 matching lines...) Expand all Loading... |
37 function onAbort(evt) | 37 function onAbort(evt) |
38 { | 38 { |
39 preamble(evt); | 39 preamble(evt); |
40 shouldBe("event.target.db.version", "0"); | 40 shouldBe("event.target.db.version", "0"); |
41 shouldBeNonNull("request.transaction"); | 41 shouldBeNonNull("request.transaction"); |
42 } | 42 } |
43 | 43 |
44 function onError(evt) | 44 function onError(evt) |
45 { | 45 { |
46 preamble(evt); | 46 preamble(evt); |
47 shouldBe("db", "event.target.result"); | |
48 shouldBe("request", "event.target"); | 47 shouldBe("request", "event.target"); |
| 48 shouldBeUndefined("event.target.result"); |
| 49 shouldBeNonNull("event.target.error"); |
49 shouldBeEqualToString("event.target.error.name", "AbortError"); | 50 shouldBeEqualToString("event.target.error.name", "AbortError"); |
50 shouldBe("event.target.result.version", "0"); | |
51 shouldBeNull("request.transaction"); | 51 shouldBeNull("request.transaction"); |
52 finishJSTest(); | 52 finishJSTest(); |
53 } | 53 } |
54 | 54 |
55 test(); | 55 test(); |
OLD | NEW |