Skip to content

Commit

Permalink
Review dgrogan's Indexed DB tests
Browse files Browse the repository at this point in the history
- Remove support.js as it is ready
- Remove an assert as 'request' is not defined
- Use assert_true for boolean assertion
  • Loading branch information
Zhiqiang Zhang committed Dec 11, 2013
1 parent eb339b3 commit 921b2cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 105 deletions.
7 changes: 3 additions & 4 deletions IndexedDB/abort-in-initial-upgradeneeded.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,23 @@

<script>

var db, open_rq = createdb(async_test(), undefined, 2)
var db, open_rq = createdb(async_test(), undefined, 2);

open_rq.onupgradeneeded = function(e) {
db = e.target.result;
assert_equals(db.version, 2);
transaction = e.target.transaction;
transaction.oncomplete = fail(this, "unexpected transaction.complete")
transaction.oncomplete = fail(this, "unexpected transaction.complete");
transaction.onabort = function(e) {
assert_equals(e.target.db.version, 0);
assert_true(!!request.transaction, "request.transaction should be non-null");
}
db.onabort = function() {}

transaction.abort();
}

open_rq.onerror = function(e) {
assert_equals(!!e.target.result, true, "event.target.result should be non-null");
assert_true(!!e.target.result, "event.target.result should be non-null");
assert_equals(db, e.target.result);
assert_equals(open_rq, e.target);
assert_equals(e.target.error.name, "AbortError");
Expand Down
101 changes: 0 additions & 101 deletions IndexedDB/support.js

This file was deleted.

0 comments on commit 921b2cf

Please sign in to comment.