You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/04/16 23:30:47 UTC
spec commit: CB-482: window.openDatabase on Android doesn't handle
the version parameter very well
Updated Branches:
refs/heads/master 0e412704a -> bfe48ce6c
CB-482: window.openDatabase on Android doesn't handle the version parameter very well
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/commit/bfe48ce6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/tree/bfe48ce6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/diff/bfe48ce6
Branch: refs/heads/master
Commit: bfe48ce6c2c7fd3bebb8415ab4748f985852079d
Parents: 0e41270
Author: macdonst <si...@gmail.com>
Authored: Thu Apr 12 12:09:02 2012 -0400
Committer: macdonst <si...@gmail.com>
Committed: Thu Apr 12 12:09:02 2012 -0400
----------------------------------------------------------------------
autotest/tests/storage.tests.js | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/bfe48ce6/autotest/tests/storage.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/storage.tests.js b/autotest/tests/storage.tests.js
index 41476d8..aa19267 100644
--- a/autotest/tests/storage.tests.js
+++ b/autotest/tests/storage.tests.js
@@ -164,7 +164,19 @@ Tests.prototype.StorageTests = function()
ok(typeof(window.openDatabase) == "function", "Database is defined");
});
test("Should open a database", function() {
+ expect(1);
+ var db = openDatabase("Database", "1.0", "HTML5 Database API example", 200000);
+ ok(db != null, "Database should be opened");
+ });
+ test("Should not gobble INVALID_STATE_ERR exceptions", function() {
+ expect(2);
var db = openDatabase("Database", "1.0", "HTML5 Database API example", 200000);
ok(db != null, "Database should be opened");
+ try {
+ console.log("Trying to open db with version 5.0");
+ db = openDatabase("Database", "5.0", "HTML5 Database API example", 200000);
+ } catch (e) {
+ ok(e.code === 11, "INVALID_STATE_ERR should be thrown");
+ }
});
}