Test IndexedDB

Odin Hørthe Omdal, @odinho_, Opera Software

Test IndexedDB

Storage? Don't we have cookies?

  • Cookies
  • localStorage
  • WebSQL
  • ...

IndexedDB

Tests for IDB

  • Big spec
  • Everyone implements it (Opera, IE10, Firefox 16, Chrome 21)
  • Needs loads of tests!

333 tests so far

How to use?

			    var count_request = db.transaction("store", "read")
			                          .objectStore("store")
			                          .count()
			    count_request.onsuccess = function() {
			        console.log(count_request.result)
			    }
			

Tests (simple)

  1. Extend a IDBTransaction.oncomplete test
  2. Mark up tests that already exist
  3. Go through spec, find where several exceptions might fire at the same time

Tests (moderate)

  1. Write a test for a (possible) spec change (making openCursor(undefined, "prev") work as you expect

Tests (difficult)

  1. Check exceptions for the ones with undefined ordering.
    • Find out what browsers do.
    • Update bug #17681 with what you found.
  2. After #1, propose a behaviour that can be specced, and write tests for it.
|-- README
|-- test-suggestions.txt
|-- starters
|   |-- incomplete
|   |   `-- idbtransaction-oncomplete.htm
|   `-- test_template.htm
`-- tests
    `-- testAuthor
        |-- approved
        |-- inprogress
        `-- needsreview
|-- examples
|   |-- idbcursor-direction-index-keyrange.htm
|   |-- idbindex-multientry-arraykeypath.htm
|   |-- idbindex_count3.htm
|   |-- idbobjectstore_createIndex7-event_order.htm
|   |-- idbobjectstore_deleted.htm
|   |-- key_invalid.htm
|   `-- support.js
			

Moar IndexedDB tests!

Odin Hørthe Omdal, Opera Software

Any questions?