[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jorlow at chromium.org
jorlow at chromium.org
Wed Dec 22 11:28:04 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit be2518195f135ceeaf71da0ec3e25daafe148c63
Author: jorlow at chromium.org <jorlow at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jul 26 17:37:50 2010 +0000
2010-07-26 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Ojan Vafai.
Rename indexedDB tests to match new scheme
https://bugs.webkit.org/show_bug.cgi?id=42375
No changes to the tests themselves.
* storage/indexeddb/script-tests/basics.js: Added.
(openCallback):
(test):
* storage/indexeddb/script-tests/database-basics.js: Added.
(openSuccess):
(test):
* storage/indexeddb/script-tests/idb-database-request.js: Removed.
* storage/indexeddb/script-tests/idb-objectstore-request.js: Removed.
* storage/indexeddb/script-tests/indexed-database-request.js: Removed.
* storage/indexeddb/script-tests/keyrange.js: Renamed from LayoutTests/storage/indexeddb/script-tests/idb-keyrange.js.
(checkSingleKeyRange):
(checkLeftBoundKeyRange):
():
* storage/indexeddb/script-tests/objectstore-basics.js: Added.
(test):
(openSuccess):
(createSuccess):
(addSuccess):
(getSuccess):
(removeSuccess):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2f8c734..c3ebf41 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,33 @@
+2010-07-26 Jeremy Orlow <jorlow at chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ Rename indexedDB tests to match new scheme
+ https://bugs.webkit.org/show_bug.cgi?id=42375
+
+ No changes to the tests themselves.
+
+ * storage/indexeddb/script-tests/basics.js: Added.
+ (openCallback):
+ (test):
+ * storage/indexeddb/script-tests/database-basics.js: Added.
+ (openSuccess):
+ (test):
+ * storage/indexeddb/script-tests/idb-database-request.js: Removed.
+ * storage/indexeddb/script-tests/idb-objectstore-request.js: Removed.
+ * storage/indexeddb/script-tests/indexed-database-request.js: Removed.
+ * storage/indexeddb/script-tests/keyrange.js: Renamed from LayoutTests/storage/indexeddb/script-tests/idb-keyrange.js.
+ (checkSingleKeyRange):
+ (checkLeftBoundKeyRange):
+ ():
+ * storage/indexeddb/script-tests/objectstore-basics.js: Added.
+ (test):
+ (openSuccess):
+ (createSuccess):
+ (addSuccess):
+ (getSuccess):
+ (removeSuccess):
+
2010-07-26 Marcus Bulach <bulach at chromium.org>
Unreviewed. Add chromium expectations for failing tests.
diff --git a/LayoutTests/storage/indexeddb/basics-expected.txt b/LayoutTests/storage/indexeddb/basics-expected.txt
new file mode 100644
index 0000000..5365901
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/basics-expected.txt
@@ -0,0 +1,30 @@
+Test IndexedDB's basics.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS 'indexedDB' in window is true
+PASS indexedDB == null is false
+indexedDB.open('name', 'description')
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/basics.html b/LayoutTests/storage/indexeddb/basics.html
new file mode 100644
index 0000000..24af453
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/basics.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script src="../../fast/js/resources/js-test-post-function.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/basics.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/database-basics-expected.txt b/LayoutTests/storage/indexeddb/database-basics-expected.txt
new file mode 100644
index 0000000..ea869e0
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/database-basics-expected.txt
@@ -0,0 +1,35 @@
+Test the basics of IndexedDB's IDBDatabase.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB.open('name', 'description')
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+db = event.result
+PASS db.name is "name"
+PASS db.description is "description"
+PASS db.version is ""
+PASS db.objectStores is []
+PASS db.objectStores.length is 0
+PASS db.objectStores.contains('') is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/database-basics.html b/LayoutTests/storage/indexeddb/database-basics.html
new file mode 100644
index 0000000..9c92194
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/database-basics.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script src="../../fast/js/resources/js-test-post-function.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/database-basics.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/idb-database-request-expected.txt b/LayoutTests/storage/indexeddb/idb-database-request-expected.txt
deleted file mode 100644
index 2651dd8..0000000
--- a/LayoutTests/storage/indexeddb/idb-database-request-expected.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-Test IndexedDB's IDBDatabaseRequest.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-indexedDB.open('name', 'description')
-PASS 'onsuccess' in result is true
-PASS 'onerror' in result is true
-PASS 'abort' in result is true
-PASS 'readyState' in result is true
-An event should fire shortly...
-
-Success event fired:
-PASS 'result' in event is true
-PASS 'code' in event is false
-PASS 'message' in event is false
-PASS 'source' in event is true
-PASS event.source != null is true
-PASS 'onsuccess' in event.target is true
-PASS 'onerror' in event.target is true
-PASS 'abort' in event.target is true
-PASS 'readyState' in event.target is true
-PASS event.target.readyState is event.target.DONE
-
-db = event.result
-PASS db.name is "name"
-PASS db.description is "description"
-PASS db.version is ""
-PASS db.objectStores is []
-PASS db.objectStores.length is 0
-PASS db.objectStores.contains('') is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/storage/indexeddb/idb-database-request.html b/LayoutTests/storage/indexeddb/idb-database-request.html
deleted file mode 100644
index 3ea2893..0000000
--- a/LayoutTests/storage/indexeddb/idb-database-request.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-<script src="resources/shared.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/idb-database-request.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/storage/indexeddb/idb-keyrange-expected.txt b/LayoutTests/storage/indexeddb/idb-keyrange-expected.txt
deleted file mode 100644
index 316a97b..0000000
--- a/LayoutTests/storage/indexeddb/idb-keyrange-expected.txt
+++ /dev/null
@@ -1,119 +0,0 @@
-Test IndexedDB's KeyRange.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-indexedDB.makeSingleKeyRange(1)
-PASS keyRange.left is 1
-PASS keyRange.right is 1
-PASS keyRange.flags is keyRange.SINGLE
-indexedDB.makeSingleKeyRange('a')
-PASS keyRange.left is 'a'
-PASS keyRange.right is 'a'
-PASS keyRange.flags is keyRange.SINGLE
-indexedDB.makeLeftBoundKeyRange(10,true)
-PASS keyRange.left is 10
-PASS keyRange.right is null
-PASS keyRange.flags is keyRange.LEFT_OPEN
-indexedDB.makeLeftBoundKeyRange(11,false)
-PASS keyRange.left is 11
-PASS keyRange.right is null
-PASS keyRange.flags is keyRange.LEFT_BOUND
-indexedDB.makeLeftBoundKeyRange(12,undefined)
-PASS keyRange.left is 12
-PASS keyRange.right is null
-PASS keyRange.flags is keyRange.LEFT_BOUND
-indexedDB.makeLeftBoundKeyRange('aa',true)
-PASS keyRange.left is 'aa'
-PASS keyRange.right is null
-PASS keyRange.flags is keyRange.LEFT_OPEN
-indexedDB.makeLeftBoundKeyRange('ab',false)
-PASS keyRange.left is 'ab'
-PASS keyRange.right is null
-PASS keyRange.flags is keyRange.LEFT_BOUND
-indexedDB.makeLeftBoundKeyRange('ac',undefined)
-PASS keyRange.left is 'ac'
-PASS keyRange.right is null
-PASS keyRange.flags is keyRange.LEFT_BOUND
-indexedDB.makeRightBoundKeyRange(20,true)
-PASS keyRange.right is 20
-PASS keyRange.left is null
-PASS keyRange.flags is keyRange.RIGHT_OPEN
-indexedDB.makeRightBoundKeyRange(21,false)
-PASS keyRange.right is 21
-PASS keyRange.left is null
-PASS keyRange.flags is keyRange.RIGHT_BOUND
-indexedDB.makeRightBoundKeyRange(22,undefined)
-PASS keyRange.right is 22
-PASS keyRange.left is null
-PASS keyRange.flags is keyRange.RIGHT_BOUND
-indexedDB.makeRightBoundKeyRange('ba',true)
-PASS keyRange.right is 'ba'
-PASS keyRange.left is null
-PASS keyRange.flags is keyRange.RIGHT_OPEN
-indexedDB.makeRightBoundKeyRange('bb',false)
-PASS keyRange.right is 'bb'
-PASS keyRange.left is null
-PASS keyRange.flags is keyRange.RIGHT_BOUND
-indexedDB.makeRightBoundKeyRange('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)
-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)
-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)
-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)
-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)
-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)
-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)
-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)
-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)
-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)
-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)
-PASS keyRange.left is 'aaf'
-PASS keyRange.right is 'abf'
-PASS leftFlags is keyRange.LEFT_OPEN
-PASS rightFlags is keyRange.RIGHT_OPEN
-PASS successfullyParsed is true
-
-TEST COMPLETE
diff --git a/LayoutTests/storage/indexeddb/idb-keyrange.html b/LayoutTests/storage/indexeddb/idb-keyrange.html
deleted file mode 100644
index 800a8cc..0000000
--- a/LayoutTests/storage/indexeddb/idb-keyrange.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-<script src="resources/shared.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/idb-keyrange.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt b/LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt
deleted file mode 100644
index 30bac34..0000000
--- a/LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt
+++ /dev/null
@@ -1,118 +0,0 @@
-Test IndexedDB's IDBObjectStoreRequest.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-indexedDB.open('name', 'description')
-PASS 'onsuccess' in result is true
-PASS 'onerror' in result is true
-PASS 'abort' in result is true
-PASS 'readyState' in result is true
-An event should fire shortly...
-
-openSuccess():
-Success event fired:
-PASS 'result' in event is true
-PASS 'code' in event is false
-PASS 'message' in event is false
-PASS 'source' in event is true
-PASS event.source != null is true
-PASS 'onsuccess' in event.target is true
-PASS 'onerror' in event.target is true
-PASS 'abort' in event.target is true
-PASS 'readyState' in event.target is true
-PASS event.target.readyState is event.target.DONE
-
-db = event.result
-db.createObjectStore('storeName', null)
-PASS 'onsuccess' in result is true
-PASS 'onerror' in result is true
-PASS 'abort' in result is true
-PASS 'readyState' in result is true
-An event should fire shortly...
-
-createSuccess():
-Success event fired:
-PASS 'result' in event is true
-PASS 'code' in event is false
-PASS 'message' in event is false
-PASS 'source' in event is true
-PASS event.source != null is true
-PASS 'onsuccess' in event.target is true
-PASS 'onerror' in event.target is true
-PASS 'abort' in event.target is true
-PASS 'readyState' in event.target is true
-PASS event.target.readyState is event.target.DONE
-
-store = event.result
-PASS store.name is "storeName"
-PASS store.keyPath is null
-store.add('value', 'key')
-PASS 'onsuccess' in result is true
-PASS 'onerror' in result is true
-PASS 'abort' in result is true
-PASS 'readyState' in result is true
-An event should fire shortly...
-
-addSuccess():
-Success event fired:
-PASS 'result' in event is true
-PASS 'code' in event is false
-PASS 'message' in event is false
-PASS 'source' in event is true
-PASS event.source != null is true
-PASS 'onsuccess' in event.target is true
-PASS 'onerror' in event.target is true
-PASS 'abort' in event.target is true
-PASS 'readyState' in event.target is true
-PASS event.target.readyState is event.target.DONE
-
-PASS event.result is "key"
-store = event.source
-store.get('key')
-PASS 'onsuccess' in result is true
-PASS 'onerror' in result is true
-PASS 'abort' in result is true
-PASS 'readyState' in result is true
-An event should fire shortly...
-
-getSuccess():
-Success event fired:
-PASS 'result' in event is true
-PASS 'code' in event is false
-PASS 'message' in event is false
-PASS 'source' in event is true
-PASS event.source != null is true
-PASS 'onsuccess' in event.target is true
-PASS 'onerror' in event.target is true
-PASS 'abort' in event.target is true
-PASS 'readyState' in event.target is true
-PASS event.target.readyState is event.target.DONE
-
-PASS event.result is "value"
-store = event.source
-store.remove('key')
-PASS 'onsuccess' in result is true
-PASS 'onerror' in result is true
-PASS 'abort' in result is true
-PASS 'readyState' in result is true
-An event should fire shortly...
-
-removeSuccess():
-Success event fired:
-PASS 'result' in event is true
-PASS 'code' in event is false
-PASS 'message' in event is false
-PASS 'source' in event is true
-PASS event.source != null is true
-PASS 'onsuccess' in event.target is true
-PASS 'onerror' in event.target is true
-PASS 'abort' in event.target is true
-PASS 'readyState' in event.target is true
-PASS event.target.readyState is event.target.DONE
-
-PASS event.result is null
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/storage/indexeddb/idb-objectstore-request.html b/LayoutTests/storage/indexeddb/idb-objectstore-request.html
deleted file mode 100644
index 87c34ea..0000000
--- a/LayoutTests/storage/indexeddb/idb-objectstore-request.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-<script src="resources/shared.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/idb-objectstore-request.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/storage/indexeddb/indexed-database-request-expected.txt b/LayoutTests/storage/indexeddb/indexed-database-request-expected.txt
deleted file mode 100644
index 1734ff9..0000000
--- a/LayoutTests/storage/indexeddb/indexed-database-request-expected.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-Test IndexedDB's IndexedDatabaseRequest.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS 'indexedDB' in window is true
-PASS indexedDB == null is false
-indexedDB.open('name', 'description')
-PASS 'onsuccess' in result is true
-PASS 'onerror' in result is true
-PASS 'abort' in result is true
-PASS 'readyState' in result is true
-An event should fire shortly...
-
-Success event fired:
-PASS 'result' in event is true
-PASS 'code' in event is false
-PASS 'message' in event is false
-PASS 'source' in event is true
-PASS event.source != null is true
-PASS 'onsuccess' in event.target is true
-PASS 'onerror' in event.target is true
-PASS 'abort' in event.target is true
-PASS 'readyState' in event.target is true
-PASS event.target.readyState is event.target.DONE
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/storage/indexeddb/indexed-database-request.html b/LayoutTests/storage/indexeddb/indexed-database-request.html
deleted file mode 100644
index c22934b..0000000
--- a/LayoutTests/storage/indexeddb/indexed-database-request.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-<script src="resources/shared.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/indexed-database-request.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/storage/indexeddb/keyrange-expected.txt b/LayoutTests/storage/indexeddb/keyrange-expected.txt
new file mode 100644
index 0000000..69fcd9d
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/keyrange-expected.txt
@@ -0,0 +1,120 @@
+Test IndexedDB's KeyRange.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB.makeSingleKeyRange(1)
+PASS keyRange.left is 1
+PASS keyRange.right is 1
+PASS keyRange.flags is keyRange.SINGLE
+indexedDB.makeSingleKeyRange('a')
+PASS keyRange.left is 'a'
+PASS keyRange.right is 'a'
+PASS keyRange.flags is keyRange.SINGLE
+indexedDB.makeLeftBoundKeyRange(10,true)
+PASS keyRange.left is 10
+PASS keyRange.right is null
+PASS keyRange.flags is keyRange.LEFT_OPEN
+indexedDB.makeLeftBoundKeyRange(11,false)
+PASS keyRange.left is 11
+PASS keyRange.right is null
+PASS keyRange.flags is keyRange.LEFT_BOUND
+indexedDB.makeLeftBoundKeyRange(12,undefined)
+PASS keyRange.left is 12
+PASS keyRange.right is null
+PASS keyRange.flags is keyRange.LEFT_BOUND
+indexedDB.makeLeftBoundKeyRange('aa',true)
+PASS keyRange.left is 'aa'
+PASS keyRange.right is null
+PASS keyRange.flags is keyRange.LEFT_OPEN
+indexedDB.makeLeftBoundKeyRange('ab',false)
+PASS keyRange.left is 'ab'
+PASS keyRange.right is null
+PASS keyRange.flags is keyRange.LEFT_BOUND
+indexedDB.makeLeftBoundKeyRange('ac',undefined)
+PASS keyRange.left is 'ac'
+PASS keyRange.right is null
+PASS keyRange.flags is keyRange.LEFT_BOUND
+indexedDB.makeRightBoundKeyRange(20,true)
+PASS keyRange.right is 20
+PASS keyRange.left is null
+PASS keyRange.flags is keyRange.RIGHT_OPEN
+indexedDB.makeRightBoundKeyRange(21,false)
+PASS keyRange.right is 21
+PASS keyRange.left is null
+PASS keyRange.flags is keyRange.RIGHT_BOUND
+indexedDB.makeRightBoundKeyRange(22,undefined)
+PASS keyRange.right is 22
+PASS keyRange.left is null
+PASS keyRange.flags is keyRange.RIGHT_BOUND
+indexedDB.makeRightBoundKeyRange('ba',true)
+PASS keyRange.right is 'ba'
+PASS keyRange.left is null
+PASS keyRange.flags is keyRange.RIGHT_OPEN
+indexedDB.makeRightBoundKeyRange('bb',false)
+PASS keyRange.right is 'bb'
+PASS keyRange.left is null
+PASS keyRange.flags is keyRange.RIGHT_BOUND
+indexedDB.makeRightBoundKeyRange('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)
+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)
+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)
+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)
+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)
+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)
+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)
+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)
+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)
+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)
+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)
+PASS keyRange.left is 'aaf'
+PASS keyRange.right is 'abf'
+PASS leftFlags is keyRange.LEFT_OPEN
+PASS rightFlags is keyRange.RIGHT_OPEN
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/keyrange.html b/LayoutTests/storage/indexeddb/keyrange.html
new file mode 100644
index 0000000..d4ef58e
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/keyrange.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script src="../../fast/js/resources/js-test-post-function.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/keyrange.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt b/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt
new file mode 100644
index 0000000..e277e92
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt
@@ -0,0 +1,118 @@
+Test the basics of IndexedDB's IDBObjectStore.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB.open('name', 'description')
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+openSuccess():
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+db = event.result
+db.createObjectStore('storeName', null)
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+createSuccess():
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+store = event.result
+PASS store.name is "storeName"
+PASS store.keyPath is null
+store.add('value', 'key')
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+addSuccess():
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+PASS event.result is "key"
+store = event.source
+store.get('key')
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+getSuccess():
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+PASS event.result is "value"
+store = event.source
+store.remove('key')
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+removeSuccess():
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+PASS event.result is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/objectstore-basics.html b/LayoutTests/storage/indexeddb/objectstore-basics.html
new file mode 100644
index 0000000..09eb68c
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/objectstore-basics.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script src="../../fast/js/resources/js-test-post-function.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<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/basics.js b/LayoutTests/storage/indexeddb/script-tests/basics.js
new file mode 100644
index 0000000..cebd48f
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/script-tests/basics.js
@@ -0,0 +1,26 @@
+description("Test IndexedDB's basics.");
+if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+function openCallback()
+{
+ verifySuccessEvent(event);
+ done();
+}
+
+function test()
+{
+ shouldBeTrue("'indexedDB' in window");
+ shouldBeFalse("indexedDB == null");
+
+ // FIXME: Verify other IndexedDatabaseRequest constructors, once they're implemented.
+
+ result = evalAndLog("indexedDB.open('name', 'description')");
+ verifyResult(result);
+ result.onsuccess = openCallback;
+ result.onerror = unexpectedErrorCallback;
+}
+
+test();
+
+var successfullyParsed = true;
diff --git a/LayoutTests/storage/indexeddb/script-tests/database-basics.js b/LayoutTests/storage/indexeddb/script-tests/database-basics.js
new file mode 100644
index 0000000..a317b71
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/script-tests/database-basics.js
@@ -0,0 +1,33 @@
+description("Test the basics of IndexedDB's IDBDatabase.");
+if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+function openSuccess()
+{
+ verifySuccessEvent(event);
+
+ var db = evalAndLog("db = event.result");
+ shouldBeEqualToString("db.name", "name");
+ shouldBeEqualToString("db.description", "description");
+ shouldBeEqualToString("db.version", "");
+ shouldBe("db.objectStores", "[]");
+ shouldBe("db.objectStores.length", "0");
+ shouldBe("db.objectStores.contains('')", "false");
+ // FIXME: Test .item() once it's possible to get back a non-empty list.
+
+ // FIXME: Test the other properties of IDBDatabase as they're written.
+
+ done();
+}
+
+function test()
+{
+ result = evalAndLog("indexedDB.open('name', 'description')");
+ verifyResult(result);
+ result.onsuccess = openSuccess;
+ result.onerror = unexpectedErrorCallback;
+}
+
+test();
+
+var successfullyParsed = true;
diff --git a/LayoutTests/storage/indexeddb/script-tests/idb-database-request.js b/LayoutTests/storage/indexeddb/script-tests/idb-database-request.js
deleted file mode 100644
index ae6a563..0000000
--- a/LayoutTests/storage/indexeddb/script-tests/idb-database-request.js
+++ /dev/null
@@ -1,31 +0,0 @@
-description("Test IndexedDB's IDBDatabaseRequest.");
-if (window.layoutTestController)
- layoutTestController.waitUntilDone();
-
-function openSuccess()
-{
- verifySuccessEvent(event);
-
- var db = evalAndLog("db = event.result");
- shouldBeEqualToString("db.name", "name");
- shouldBeEqualToString("db.description", "description");
- shouldBeEqualToString("db.version", "");
- shouldBe("db.objectStores", "[]");
- shouldBe("db.objectStores.length", "0");
- shouldBe("db.objectStores.contains('')", "false");
- // FIXME: Test .item() once it's possible to get back a non-empty list.
-
- // FIXME: Test the other properties of IDBDatabase as they're written.
-
- done();
-}
-
-function test()
-{
- result = evalAndLog("indexedDB.open('name', 'description')");
- verifyResult(result);
- result.onsuccess = openSuccess;
- result.onerror = unexpectedErrorCallback;
-}
-
-test();
diff --git a/LayoutTests/storage/indexeddb/script-tests/idb-keyrange.js b/LayoutTests/storage/indexeddb/script-tests/idb-keyrange.js
deleted file mode 100644
index 2951876..0000000
--- a/LayoutTests/storage/indexeddb/script-tests/idb-keyrange.js
+++ /dev/null
@@ -1,75 +0,0 @@
-description("Test IndexedDB's KeyRange.");
-if (window.layoutTestController)
- layoutTestController.waitUntilDone();
-
-function checkSingleKeyRange(value)
-{
- keyRange = evalAndLog("indexedDB.makeSingleKeyRange(" + value + ")");
- shouldBe("keyRange.left", "" + value);
- shouldBe("keyRange.right", "" + value);
- shouldBe("keyRange.flags", "keyRange.SINGLE");
-}
-
-function checkLeftBoundKeyRange(value, open)
-{
- keyRange = evalAndLog("indexedDB.makeLeftBoundKeyRange(" + value + "," + open + ")");
- shouldBe("keyRange.left", "" + value);
- shouldBeNull("keyRange.right");
- shouldBe("keyRange.flags", open ? "keyRange.LEFT_OPEN" : "keyRange.LEFT_BOUND");
-}
-
-function checkRightBoundKeyRange(value, open)
-{
- keyRange = evalAndLog("indexedDB.makeRightBoundKeyRange(" + value + "," + open + ")");
- shouldBe("keyRange.right", "" + value);
- shouldBeNull("keyRange.left");
- shouldBe("keyRange.flags", open ? "keyRange.RIGHT_OPEN" : "keyRange.RIGHT_BOUND");
-}
-
-function checkBoundKeyRange(left, right, openLeft, openRight)
-{
- keyRange = evalAndLog("indexedDB.makeBoundKeyRange(" + left + "," + right + "," + openLeft + "," + openRight + ")");
- shouldBe("keyRange.left", "" + left);
- shouldBe("keyRange.right", "" + right);
- leftFlags = keyRange.flags & (keyRange.LEFT_OPEN | keyRange.LEFT_BOUND);
- shouldBe("leftFlags", openLeft ? "keyRange.LEFT_OPEN" : "keyRange.LEFT_BOUND");
- rightFlags = keyRange.flags & (keyRange.RIGHT_OPEN | keyRange.RIGHT_BOUND);
- shouldBe("rightFlags", openRight ? "keyRange.RIGHT_OPEN" : "keyRange.RIGHT_BOUND");
-}
-
-function test()
-{
- checkSingleKeyRange(1);
- checkSingleKeyRange("'a'");
-
- checkLeftBoundKeyRange(10, true);
- checkLeftBoundKeyRange(11, false);
- checkLeftBoundKeyRange(12);
- checkLeftBoundKeyRange("'aa'", true);
- checkLeftBoundKeyRange("'ab'", false);
- checkLeftBoundKeyRange("'ac'");
-
- checkRightBoundKeyRange(20, true);
- checkRightBoundKeyRange(21, false);
- checkRightBoundKeyRange(22);
- checkRightBoundKeyRange("'ba'", true);
- checkRightBoundKeyRange("'bb'", false);
- checkRightBoundKeyRange("'bc'");
-
- checkBoundKeyRange(30, 40);
- checkBoundKeyRange(31, 41, false, false);
- checkBoundKeyRange(32, 42, false, true);
- checkBoundKeyRange(33, 43, true, false);
- checkBoundKeyRange(34, 44, true, true);
-
- checkBoundKeyRange("'aaa'", "'aba'", false, false);
- checkBoundKeyRange("'aab'", "'abb'");
- checkBoundKeyRange("'aac'", "'abc'", false, false);
- checkBoundKeyRange("'aad'", "'abd'", false, true);
- checkBoundKeyRange("'aae'", "'abe'", true, false);
- checkBoundKeyRange("'aaf'", "'abf'", true, true);
-
- done();
-}
-
-test();
diff --git a/LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js b/LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js
deleted file mode 100644
index 045db12..0000000
--- a/LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js
+++ /dev/null
@@ -1,78 +0,0 @@
-description("Test IndexedDB's IDBObjectStoreRequest.");
-if (window.layoutTestController)
- layoutTestController.waitUntilDone();
-
-function test()
-{
- result = evalAndLog("indexedDB.open('name', 'description')");
- verifyResult(result);
- result.onsuccess = openSuccess;
- result.onerror = unexpectedErrorCallback;
-}
-
-function openSuccess()
-{
- debug("openSuccess():");
- verifySuccessEvent(event);
- var db = evalAndLog("db = event.result");
-
- // FIXME: remove any previously created object stores.
- // This requires IDBDatabaseRequest::removeObjectStore to be implemented.
-
- result = evalAndLog("db.createObjectStore('storeName', null)");
- verifyResult(result);
- result.onsuccess = createSuccess;
- result.onerror = unexpectedErrorCallback;
-}
-
-function createSuccess()
-{
- debug("createSuccess():");
- verifySuccessEvent(event);
- var store = evalAndLog("store = event.result");
-
- shouldBeEqualToString("store.name", "storeName");
- shouldBeNull("store.keyPath");
- // FIXME: test store.indexNames, as well as all object store's methods.
-
- result = evalAndLog("store.add('value', 'key')");
- verifyResult(result);
- result.onsuccess = addSuccess;
- result.onerror = unexpectedErrorCallback;
-}
-
-function addSuccess()
-{
- debug("addSuccess():");
- verifySuccessEvent(event);
- shouldBeEqualToString("event.result", "key");
- var store = evalAndLog("store = event.source");
-
- result = evalAndLog("store.get('key')");
- verifyResult(result);
- result.onsuccess = getSuccess;
- result.onerror = unexpectedErrorCallback;
-}
-
-function getSuccess()
-{
- debug("getSuccess():");
- verifySuccessEvent(event);
- shouldBeEqualToString("event.result", "value");
- var store = evalAndLog("store = event.source");
-
- result = evalAndLog("store.remove('key')");
- verifyResult(result);
- result.onsuccess = removeSuccess;
- result.onerror = unexpectedErrorCallback;
-}
-
-function removeSuccess()
-{
- debug("removeSuccess():");
- verifySuccessEvent(event);
- shouldBeNull("event.result");
- done();
-}
-
-test();
diff --git a/LayoutTests/storage/indexeddb/script-tests/indexed-database-request.js b/LayoutTests/storage/indexeddb/script-tests/indexed-database-request.js
deleted file mode 100644
index 6f77279..0000000
--- a/LayoutTests/storage/indexeddb/script-tests/indexed-database-request.js
+++ /dev/null
@@ -1,24 +0,0 @@
-description("Test IndexedDB's IndexedDatabaseRequest.");
-if (window.layoutTestController)
- layoutTestController.waitUntilDone();
-
-function openCallback()
-{
- verifySuccessEvent(event);
- done();
-}
-
-function test()
-{
- shouldBeTrue("'indexedDB' in window");
- shouldBeFalse("indexedDB == null");
-
- // FIXME: Verify other IndexedDatabaseRequest constructors, once they're implemented.
-
- result = evalAndLog("indexedDB.open('name', 'description')");
- verifyResult(result);
- result.onsuccess = openCallback;
- result.onerror = unexpectedErrorCallback;
-}
-
-test();
diff --git a/LayoutTests/storage/indexeddb/script-tests/keyrange.js b/LayoutTests/storage/indexeddb/script-tests/keyrange.js
new file mode 100644
index 0000000..2c2cdde
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/script-tests/keyrange.js
@@ -0,0 +1,76 @@
+description("Test IndexedDB's KeyRange.");
+if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+function checkSingleKeyRange(value)
+{
+ keyRange = evalAndLog("indexedDB.makeSingleKeyRange(" + value + ")");
+ shouldBe("keyRange.left", "" + value);
+ shouldBe("keyRange.right", "" + value);
+ shouldBe("keyRange.flags", "keyRange.SINGLE");
+}
+
+function checkLeftBoundKeyRange(value, open)
+{
+ keyRange = evalAndLog("indexedDB.makeLeftBoundKeyRange(" + value + "," + open + ")");
+ shouldBe("keyRange.left", "" + value);
+ shouldBeNull("keyRange.right");
+ shouldBe("keyRange.flags", open ? "keyRange.LEFT_OPEN" : "keyRange.LEFT_BOUND");
+}
+
+function checkRightBoundKeyRange(value, open)
+{
+ keyRange = evalAndLog("indexedDB.makeRightBoundKeyRange(" + value + "," + open + ")");
+ shouldBe("keyRange.right", "" + value);
+ shouldBeNull("keyRange.left");
+ shouldBe("keyRange.flags", open ? "keyRange.RIGHT_OPEN" : "keyRange.RIGHT_BOUND");
+}
+
+function checkBoundKeyRange(left, right, openLeft, openRight)
+{
+ keyRange = evalAndLog("indexedDB.makeBoundKeyRange(" + left + "," + right + "," + openLeft + "," + openRight + ")");
+ shouldBe("keyRange.left", "" + left);
+ shouldBe("keyRange.right", "" + right);
+ leftFlags = keyRange.flags & (keyRange.LEFT_OPEN | keyRange.LEFT_BOUND);
+ shouldBe("leftFlags", openLeft ? "keyRange.LEFT_OPEN" : "keyRange.LEFT_BOUND");
+ rightFlags = keyRange.flags & (keyRange.RIGHT_OPEN | keyRange.RIGHT_BOUND);
+ shouldBe("rightFlags", openRight ? "keyRange.RIGHT_OPEN" : "keyRange.RIGHT_BOUND");
+}
+
+function test()
+{
+ checkSingleKeyRange(1);
+ checkSingleKeyRange("'a'");
+
+ checkLeftBoundKeyRange(10, true);
+ checkLeftBoundKeyRange(11, false);
+ checkLeftBoundKeyRange(12);
+ checkLeftBoundKeyRange("'aa'", true);
+ checkLeftBoundKeyRange("'ab'", false);
+ checkLeftBoundKeyRange("'ac'");
+
+ checkRightBoundKeyRange(20, true);
+ checkRightBoundKeyRange(21, false);
+ checkRightBoundKeyRange(22);
+ checkRightBoundKeyRange("'ba'", true);
+ checkRightBoundKeyRange("'bb'", false);
+ checkRightBoundKeyRange("'bc'");
+
+ checkBoundKeyRange(30, 40);
+ checkBoundKeyRange(31, 41, false, false);
+ checkBoundKeyRange(32, 42, false, true);
+ checkBoundKeyRange(33, 43, true, false);
+ checkBoundKeyRange(34, 44, true, true);
+
+ checkBoundKeyRange("'aaa'", "'aba'", false, false);
+ checkBoundKeyRange("'aab'", "'abb'");
+ checkBoundKeyRange("'aac'", "'abc'", false, false);
+ checkBoundKeyRange("'aad'", "'abd'", false, true);
+ checkBoundKeyRange("'aae'", "'abe'", true, false);
+ checkBoundKeyRange("'aaf'", "'abf'", true, true);
+}
+
+test();
+
+var successfullyParsed = true;
+done();
diff --git a/LayoutTests/storage/indexeddb/script-tests/objectstore-basics.js b/LayoutTests/storage/indexeddb/script-tests/objectstore-basics.js
new file mode 100644
index 0000000..2e42e38
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/script-tests/objectstore-basics.js
@@ -0,0 +1,80 @@
+description("Test the basics of IndexedDB's IDBObjectStore.");
+if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+function test()
+{
+ result = evalAndLog("indexedDB.open('name', 'description')");
+ verifyResult(result);
+ result.onsuccess = openSuccess;
+ result.onerror = unexpectedErrorCallback;
+}
+
+function openSuccess()
+{
+ debug("openSuccess():");
+ verifySuccessEvent(event);
+ var db = evalAndLog("db = event.result");
+
+ // FIXME: remove any previously created object stores.
+ // This requires IDBDatabaseRequest::removeObjectStore to be implemented.
+
+ result = evalAndLog("db.createObjectStore('storeName', null)");
+ verifyResult(result);
+ result.onsuccess = createSuccess;
+ result.onerror = unexpectedErrorCallback;
+}
+
+function createSuccess()
+{
+ debug("createSuccess():");
+ verifySuccessEvent(event);
+ var store = evalAndLog("store = event.result");
+
+ shouldBeEqualToString("store.name", "storeName");
+ shouldBeNull("store.keyPath");
+ // FIXME: test store.indexNames, as well as all object store's methods.
+
+ result = evalAndLog("store.add('value', 'key')");
+ verifyResult(result);
+ result.onsuccess = addSuccess;
+ result.onerror = unexpectedErrorCallback;
+}
+
+function addSuccess()
+{
+ debug("addSuccess():");
+ verifySuccessEvent(event);
+ shouldBeEqualToString("event.result", "key");
+ var store = evalAndLog("store = event.source");
+
+ result = evalAndLog("store.get('key')");
+ verifyResult(result);
+ result.onsuccess = getSuccess;
+ result.onerror = unexpectedErrorCallback;
+}
+
+function getSuccess()
+{
+ debug("getSuccess():");
+ verifySuccessEvent(event);
+ shouldBeEqualToString("event.result", "value");
+ var store = evalAndLog("store = event.source");
+
+ result = evalAndLog("store.remove('key')");
+ verifyResult(result);
+ result.onsuccess = removeSuccess;
+ result.onerror = unexpectedErrorCallback;
+}
+
+function removeSuccess()
+{
+ debug("removeSuccess():");
+ verifySuccessEvent(event);
+ shouldBeNull("event.result");
+ done();
+}
+
+test();
+
+var successfullyParsed = true;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list