summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-07-30 10:46:49 +0100
committerKristian Monsen <kristianm@google.com>2010-08-04 13:01:34 +0100
commit0617145a89917ae7735fe1c9538688ab9a577df5 (patch)
tree56206078694427c37ed7bdf27eb5221398b833c0 /LayoutTests/storage
parentef1adcdfc805d4d13103f6f15cc5b4d96828a60f (diff)
downloadexternal_webkit-0617145a89917ae7735fe1c9538688ab9a577df5.zip
external_webkit-0617145a89917ae7735fe1c9538688ab9a577df5.tar.gz
external_webkit-0617145a89917ae7735fe1c9538688ab9a577df5.tar.bz2
Merge WebKit at r64264 : Initial merge by git.
Change-Id: Ic42bef02efef8217a0f84c47176a9c617c28d1f1
Diffstat (limited to 'LayoutTests/storage')
-rw-r--r--LayoutTests/storage/change-version.html6
-rw-r--r--LayoutTests/storage/indexeddb/basics-expected.txt (renamed from LayoutTests/storage/indexeddb/indexed-database-request-expected.txt)2
-rw-r--r--LayoutTests/storage/indexeddb/basics.html (renamed from LayoutTests/storage/indexeddb/idb-keyrange.html)2
-rw-r--r--LayoutTests/storage/indexeddb/database-basics-expected.txt (renamed from LayoutTests/storage/indexeddb/idb-database-request-expected.txt)2
-rw-r--r--LayoutTests/storage/indexeddb/database-basics.html (renamed from LayoutTests/storage/indexeddb/idb-database-request.html)2
-rw-r--r--LayoutTests/storage/indexeddb/keyrange-expected.txt (renamed from LayoutTests/storage/indexeddb/idb-keyrange-expected.txt)50
-rw-r--r--LayoutTests/storage/indexeddb/keyrange.html (renamed from LayoutTests/storage/indexeddb/idb-objectstore-request.html)2
-rw-r--r--LayoutTests/storage/indexeddb/objectstore-basics-expected.txt (renamed from LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt)6
-rw-r--r--LayoutTests/storage/indexeddb/objectstore-basics.html (renamed from LayoutTests/storage/indexeddb/indexed-database-request.html)2
-rw-r--r--LayoutTests/storage/indexeddb/resources/shared.js1
-rw-r--r--LayoutTests/storage/indexeddb/script-tests/basics.js (renamed from LayoutTests/storage/indexeddb/script-tests/indexed-database-request.js)6
-rw-r--r--LayoutTests/storage/indexeddb/script-tests/database-basics.js (renamed from LayoutTests/storage/indexeddb/script-tests/idb-database-request.js)4
-rw-r--r--LayoutTests/storage/indexeddb/script-tests/keyrange.js (renamed from LayoutTests/storage/indexeddb/script-tests/idb-keyrange.js)13
-rw-r--r--LayoutTests/storage/indexeddb/script-tests/objectstore-basics.js (renamed from LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js)9
14 files changed, 61 insertions, 46 deletions
diff --git a/LayoutTests/storage/change-version.html b/LayoutTests/storage/change-version.html
index 9b6876c..79bb9df 100644
--- a/LayoutTests/storage/change-version.html
+++ b/LayoutTests/storage/change-version.html
@@ -44,6 +44,10 @@ function runTest()
if (window.location.search == "?2") {
db1 = window.openDatabase("changeversion-test", "", "Test for the database.changeVersion() function", 1024);
log("Finished tests with version " + db1.version + "; expected version: " + EXPECTED_VERSION_AFTER_RELOAD);
+
+ // Reset the DB version or the next run might fail.
+ db1.changeVersion(db1.version, "1");
+
finishTest();
} else
testPart1();
@@ -60,7 +64,7 @@ function testPart1() {
var db2 = window.openDatabase("changeversion-test", "1", "Test for the database.changeVersion() function", 1024);
// First run Hixie's test to ensure basic changeVersion functionality works (see bug 28418).
- db1.changeVersion("1", EXPECTED_VERSION_AFTER_HIXIE_TEST, emptyFunction, function (e) {
+ db1.changeVersion("1", EXPECTED_VERSION_AFTER_HIXIE_TEST, null, function (e) {
log("FAIL in changeVersion:" + e);
finishTest();
}, function () {
diff --git a/LayoutTests/storage/indexeddb/indexed-database-request-expected.txt b/LayoutTests/storage/indexeddb/basics-expected.txt
index 1734ff9..5365901 100644
--- a/LayoutTests/storage/indexeddb/indexed-database-request-expected.txt
+++ b/LayoutTests/storage/indexeddb/basics-expected.txt
@@ -1,4 +1,4 @@
-Test IndexedDB's IndexedDatabaseRequest.
+Test IndexedDB's basics.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
diff --git a/LayoutTests/storage/indexeddb/idb-keyrange.html b/LayoutTests/storage/indexeddb/basics.html
index 800a8cc..24af453 100644
--- a/LayoutTests/storage/indexeddb/idb-keyrange.html
+++ b/LayoutTests/storage/indexeddb/basics.html
@@ -8,6 +8,6 @@
<body>
<p id="description"></p>
<div id="console"></div>
-<script src="script-tests/idb-keyrange.js"></script>
+<script src="script-tests/basics.js"></script>
</body>
</html>
diff --git a/LayoutTests/storage/indexeddb/idb-database-request-expected.txt b/LayoutTests/storage/indexeddb/database-basics-expected.txt
index 2651dd8..ea869e0 100644
--- a/LayoutTests/storage/indexeddb/idb-database-request-expected.txt
+++ b/LayoutTests/storage/indexeddb/database-basics-expected.txt
@@ -1,4 +1,4 @@
-Test IndexedDB's IDBDatabaseRequest.
+Test the basics of IndexedDB's IDBDatabase.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
diff --git a/LayoutTests/storage/indexeddb/idb-database-request.html b/LayoutTests/storage/indexeddb/database-basics.html
index 3ea2893..9c92194 100644
--- a/LayoutTests/storage/indexeddb/idb-database-request.html
+++ b/LayoutTests/storage/indexeddb/database-basics.html
@@ -8,6 +8,6 @@
<body>
<p id="description"></p>
<div id="console"></div>
-<script src="script-tests/idb-database-request.js"></script>
+<script src="script-tests/database-basics.js"></script>
</body>
</html>
diff --git a/LayoutTests/storage/indexeddb/idb-keyrange-expected.txt b/LayoutTests/storage/indexeddb/keyrange-expected.txt
index 316a97b..fc61b2f 100644
--- a/LayoutTests/storage/indexeddb/idb-keyrange-expected.txt
+++ b/LayoutTests/storage/indexeddb/keyrange-expected.txt
@@ -3,113 +3,113 @@ Test IndexedDB's KeyRange.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-indexedDB.makeSingleKeyRange(1)
+IDBKeyRange.only(1)
PASS keyRange.left is 1
PASS keyRange.right is 1
PASS keyRange.flags is keyRange.SINGLE
-indexedDB.makeSingleKeyRange('a')
+IDBKeyRange.only('a')
PASS keyRange.left is 'a'
PASS keyRange.right is 'a'
PASS keyRange.flags is keyRange.SINGLE
-indexedDB.makeLeftBoundKeyRange(10,true)
+IDBKeyRange.leftBound(10,true)
PASS keyRange.left is 10
PASS keyRange.right is null
PASS keyRange.flags is keyRange.LEFT_OPEN
-indexedDB.makeLeftBoundKeyRange(11,false)
+IDBKeyRange.leftBound(11,false)
PASS keyRange.left is 11
PASS keyRange.right is null
PASS keyRange.flags is keyRange.LEFT_BOUND
-indexedDB.makeLeftBoundKeyRange(12,undefined)
+IDBKeyRange.leftBound(12,undefined)
PASS keyRange.left is 12
PASS keyRange.right is null
PASS keyRange.flags is keyRange.LEFT_BOUND
-indexedDB.makeLeftBoundKeyRange('aa',true)
+IDBKeyRange.leftBound('aa',true)
PASS keyRange.left is 'aa'
PASS keyRange.right is null
PASS keyRange.flags is keyRange.LEFT_OPEN
-indexedDB.makeLeftBoundKeyRange('ab',false)
+IDBKeyRange.leftBound('ab',false)
PASS keyRange.left is 'ab'
PASS keyRange.right is null
PASS keyRange.flags is keyRange.LEFT_BOUND
-indexedDB.makeLeftBoundKeyRange('ac',undefined)
+IDBKeyRange.leftBound('ac',undefined)
PASS keyRange.left is 'ac'
PASS keyRange.right is null
PASS keyRange.flags is keyRange.LEFT_BOUND
-indexedDB.makeRightBoundKeyRange(20,true)
+IDBKeyRange.rightBound(20,true)
PASS keyRange.right is 20
PASS keyRange.left is null
PASS keyRange.flags is keyRange.RIGHT_OPEN
-indexedDB.makeRightBoundKeyRange(21,false)
+IDBKeyRange.rightBound(21,false)
PASS keyRange.right is 21
PASS keyRange.left is null
PASS keyRange.flags is keyRange.RIGHT_BOUND
-indexedDB.makeRightBoundKeyRange(22,undefined)
+IDBKeyRange.rightBound(22,undefined)
PASS keyRange.right is 22
PASS keyRange.left is null
PASS keyRange.flags is keyRange.RIGHT_BOUND
-indexedDB.makeRightBoundKeyRange('ba',true)
+IDBKeyRange.rightBound('ba',true)
PASS keyRange.right is 'ba'
PASS keyRange.left is null
PASS keyRange.flags is keyRange.RIGHT_OPEN
-indexedDB.makeRightBoundKeyRange('bb',false)
+IDBKeyRange.rightBound('bb',false)
PASS keyRange.right is 'bb'
PASS keyRange.left is null
PASS keyRange.flags is keyRange.RIGHT_BOUND
-indexedDB.makeRightBoundKeyRange('bc',undefined)
+IDBKeyRange.rightBound('bc',undefined)
PASS keyRange.right is 'bc'
PASS keyRange.left is null
PASS keyRange.flags is keyRange.RIGHT_BOUND
-indexedDB.makeBoundKeyRange(30,40,undefined,undefined)
+IDBKeyRange.bound(30,40,undefined,undefined)
PASS keyRange.left is 30
PASS keyRange.right is 40
PASS leftFlags is keyRange.LEFT_BOUND
PASS rightFlags is keyRange.RIGHT_BOUND
-indexedDB.makeBoundKeyRange(31,41,false,false)
+IDBKeyRange.bound(31,41,false,false)
PASS keyRange.left is 31
PASS keyRange.right is 41
PASS leftFlags is keyRange.LEFT_BOUND
PASS rightFlags is keyRange.RIGHT_BOUND
-indexedDB.makeBoundKeyRange(32,42,false,true)
+IDBKeyRange.bound(32,42,false,true)
PASS keyRange.left is 32
PASS keyRange.right is 42
PASS leftFlags is keyRange.LEFT_BOUND
PASS rightFlags is keyRange.RIGHT_OPEN
-indexedDB.makeBoundKeyRange(33,43,true,false)
+IDBKeyRange.bound(33,43,true,false)
PASS keyRange.left is 33
PASS keyRange.right is 43
PASS leftFlags is keyRange.LEFT_OPEN
PASS rightFlags is keyRange.RIGHT_BOUND
-indexedDB.makeBoundKeyRange(34,44,true,true)
+IDBKeyRange.bound(34,44,true,true)
PASS keyRange.left is 34
PASS keyRange.right is 44
PASS leftFlags is keyRange.LEFT_OPEN
PASS rightFlags is keyRange.RIGHT_OPEN
-indexedDB.makeBoundKeyRange('aaa','aba',false,false)
+IDBKeyRange.bound('aaa','aba',false,false)
PASS keyRange.left is 'aaa'
PASS keyRange.right is 'aba'
PASS leftFlags is keyRange.LEFT_BOUND
PASS rightFlags is keyRange.RIGHT_BOUND
-indexedDB.makeBoundKeyRange('aab','abb',undefined,undefined)
+IDBKeyRange.bound('aab','abb',undefined,undefined)
PASS keyRange.left is 'aab'
PASS keyRange.right is 'abb'
PASS leftFlags is keyRange.LEFT_BOUND
PASS rightFlags is keyRange.RIGHT_BOUND
-indexedDB.makeBoundKeyRange('aac','abc',false,false)
+IDBKeyRange.bound('aac','abc',false,false)
PASS keyRange.left is 'aac'
PASS keyRange.right is 'abc'
PASS leftFlags is keyRange.LEFT_BOUND
PASS rightFlags is keyRange.RIGHT_BOUND
-indexedDB.makeBoundKeyRange('aad','abd',false,true)
+IDBKeyRange.bound('aad','abd',false,true)
PASS keyRange.left is 'aad'
PASS keyRange.right is 'abd'
PASS leftFlags is keyRange.LEFT_BOUND
PASS rightFlags is keyRange.RIGHT_OPEN
-indexedDB.makeBoundKeyRange('aae','abe',true,false)
+IDBKeyRange.bound('aae','abe',true,false)
PASS keyRange.left is 'aae'
PASS keyRange.right is 'abe'
PASS leftFlags is keyRange.LEFT_OPEN
PASS rightFlags is keyRange.RIGHT_BOUND
-indexedDB.makeBoundKeyRange('aaf','abf',true,true)
+IDBKeyRange.bound('aaf','abf',true,true)
PASS keyRange.left is 'aaf'
PASS keyRange.right is 'abf'
PASS leftFlags is keyRange.LEFT_OPEN
diff --git a/LayoutTests/storage/indexeddb/idb-objectstore-request.html b/LayoutTests/storage/indexeddb/keyrange.html
index 87c34ea..d4ef58e 100644
--- a/LayoutTests/storage/indexeddb/idb-objectstore-request.html
+++ b/LayoutTests/storage/indexeddb/keyrange.html
@@ -8,6 +8,6 @@
<body>
<p id="description"></p>
<div id="console"></div>
-<script src="script-tests/idb-objectstore-request.js"></script>
+<script src="script-tests/keyrange.js"></script>
</body>
</html>
diff --git a/LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt b/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt
index 30bac34..105058d 100644
--- a/LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt
+++ b/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt
@@ -1,4 +1,4 @@
-Test IndexedDB's IDBObjectStoreRequest.
+Test the basics of IndexedDB's IDBObjectStore.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -45,8 +45,11 @@ PASS 'readyState' in event.target is true
PASS event.target.readyState is event.target.DONE
store = event.result
+storeNames = db.objectStores
PASS store.name is "storeName"
PASS store.keyPath is null
+PASS storeNames.contains('storeName') is true
+PASS storeNames.length is 1
store.add('value', 'key')
PASS 'onsuccess' in result is true
PASS 'onerror' in result is true
@@ -115,4 +118,3 @@ PASS event.result is null
PASS successfullyParsed is true
TEST COMPLETE
-
diff --git a/LayoutTests/storage/indexeddb/indexed-database-request.html b/LayoutTests/storage/indexeddb/objectstore-basics.html
index c22934b..09eb68c 100644
--- a/LayoutTests/storage/indexeddb/indexed-database-request.html
+++ b/LayoutTests/storage/indexeddb/objectstore-basics.html
@@ -8,6 +8,6 @@
<body>
<p id="description"></p>
<div id="console"></div>
-<script src="script-tests/indexed-database-request.js"></script>
+<script src="script-tests/objectstore-basics.js"></script>
</body>
</html>
diff --git a/LayoutTests/storage/indexeddb/resources/shared.js b/LayoutTests/storage/indexeddb/resources/shared.js
index 809bdec..e510be1 100644
--- a/LayoutTests/storage/indexeddb/resources/shared.js
+++ b/LayoutTests/storage/indexeddb/resources/shared.js
@@ -1,6 +1,5 @@
function done()
{
- window.successfullyParsed = true;
isSuccessfullyParsed();
if (window.layoutTestController)
layoutTestController.notifyDone()
diff --git a/LayoutTests/storage/indexeddb/script-tests/indexed-database-request.js b/LayoutTests/storage/indexeddb/script-tests/basics.js
index 6f77279..cebd48f 100644
--- a/LayoutTests/storage/indexeddb/script-tests/indexed-database-request.js
+++ b/LayoutTests/storage/indexeddb/script-tests/basics.js
@@ -1,5 +1,5 @@
-description("Test IndexedDB's IndexedDatabaseRequest.");
-if (window.layoutTestController)
+description("Test IndexedDB's basics.");
+if (window.layoutTestController)
layoutTestController.waitUntilDone();
function openCallback()
@@ -22,3 +22,5 @@ function test()
}
test();
+
+var successfullyParsed = true;
diff --git a/LayoutTests/storage/indexeddb/script-tests/idb-database-request.js b/LayoutTests/storage/indexeddb/script-tests/database-basics.js
index ae6a563..a317b71 100644
--- a/LayoutTests/storage/indexeddb/script-tests/idb-database-request.js
+++ b/LayoutTests/storage/indexeddb/script-tests/database-basics.js
@@ -1,4 +1,4 @@
-description("Test IndexedDB's IDBDatabaseRequest.");
+description("Test the basics of IndexedDB's IDBDatabase.");
if (window.layoutTestController)
layoutTestController.waitUntilDone();
@@ -29,3 +29,5 @@ function test()
}
test();
+
+var successfullyParsed = true;
diff --git a/LayoutTests/storage/indexeddb/script-tests/idb-keyrange.js b/LayoutTests/storage/indexeddb/script-tests/keyrange.js
index 2951876..26d283f 100644
--- a/LayoutTests/storage/indexeddb/script-tests/idb-keyrange.js
+++ b/LayoutTests/storage/indexeddb/script-tests/keyrange.js
@@ -4,7 +4,7 @@ if (window.layoutTestController)
function checkSingleKeyRange(value)
{
- keyRange = evalAndLog("indexedDB.makeSingleKeyRange(" + value + ")");
+ keyRange = evalAndLog("IDBKeyRange.only(" + value + ")");
shouldBe("keyRange.left", "" + value);
shouldBe("keyRange.right", "" + value);
shouldBe("keyRange.flags", "keyRange.SINGLE");
@@ -12,7 +12,7 @@ function checkSingleKeyRange(value)
function checkLeftBoundKeyRange(value, open)
{
- keyRange = evalAndLog("indexedDB.makeLeftBoundKeyRange(" + value + "," + open + ")");
+ keyRange = evalAndLog("IDBKeyRange.leftBound(" + value + "," + open + ")");
shouldBe("keyRange.left", "" + value);
shouldBeNull("keyRange.right");
shouldBe("keyRange.flags", open ? "keyRange.LEFT_OPEN" : "keyRange.LEFT_BOUND");
@@ -20,7 +20,7 @@ function checkLeftBoundKeyRange(value, open)
function checkRightBoundKeyRange(value, open)
{
- keyRange = evalAndLog("indexedDB.makeRightBoundKeyRange(" + value + "," + open + ")");
+ keyRange = evalAndLog("IDBKeyRange.rightBound(" + value + "," + open + ")");
shouldBe("keyRange.right", "" + value);
shouldBeNull("keyRange.left");
shouldBe("keyRange.flags", open ? "keyRange.RIGHT_OPEN" : "keyRange.RIGHT_BOUND");
@@ -28,7 +28,7 @@ function checkRightBoundKeyRange(value, open)
function checkBoundKeyRange(left, right, openLeft, openRight)
{
- keyRange = evalAndLog("indexedDB.makeBoundKeyRange(" + left + "," + right + "," + openLeft + "," + openRight + ")");
+ keyRange = evalAndLog("IDBKeyRange.bound(" + left + "," + right + "," + openLeft + "," + openRight + ")");
shouldBe("keyRange.left", "" + left);
shouldBe("keyRange.right", "" + right);
leftFlags = keyRange.flags & (keyRange.LEFT_OPEN | keyRange.LEFT_BOUND);
@@ -68,8 +68,9 @@ function test()
checkBoundKeyRange("'aad'", "'abd'", false, true);
checkBoundKeyRange("'aae'", "'abe'", true, false);
checkBoundKeyRange("'aaf'", "'abf'", true, true);
-
- done();
}
test();
+
+var successfullyParsed = true;
+done();
diff --git a/LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js b/LayoutTests/storage/indexeddb/script-tests/objectstore-basics.js
index 045db12..9869579 100644
--- a/LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js
+++ b/LayoutTests/storage/indexeddb/script-tests/objectstore-basics.js
@@ -1,4 +1,4 @@
-description("Test IndexedDB's IDBObjectStoreRequest.");
+description("Test the basics of IndexedDB's IDBObjectStore.");
if (window.layoutTestController)
layoutTestController.waitUntilDone();
@@ -14,7 +14,7 @@ function openSuccess()
{
debug("openSuccess():");
verifySuccessEvent(event);
- var db = evalAndLog("db = event.result");
+ db = evalAndLog("db = event.result");
// FIXME: remove any previously created object stores.
// This requires IDBDatabaseRequest::removeObjectStore to be implemented.
@@ -30,9 +30,12 @@ function createSuccess()
debug("createSuccess():");
verifySuccessEvent(event);
var store = evalAndLog("store = event.result");
+ var storeNames = evalAndLog("storeNames = db.objectStores");
shouldBeEqualToString("store.name", "storeName");
shouldBeNull("store.keyPath");
+ shouldBe("storeNames.contains('storeName')", "true");
+ shouldBe("storeNames.length", "1");
// FIXME: test store.indexNames, as well as all object store's methods.
result = evalAndLog("store.add('value', 'key')");
@@ -76,3 +79,5 @@ function removeSuccess()
}
test();
+
+var successfullyParsed = true;