summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/indexeddb/common.js17
-rw-r--r--chrome/test/data/indexeddb/transaction_get_test.html10
-rw-r--r--chrome/test/data/indexeddb/transaction_get_test.js70
3 files changed, 0 insertions, 97 deletions
diff --git a/chrome/test/data/indexeddb/common.js b/chrome/test/data/indexeddb/common.js
index 9ebd361..b773fe3 100644
--- a/chrome/test/data/indexeddb/common.js
+++ b/chrome/test/data/indexeddb/common.js
@@ -22,23 +22,11 @@ function getLog()
return "" + document.getElementById('status').innerHTML;
}
-function unexpectedSuccessCallback()
-{
- fail('unexpectedSuccessCallback');
-}
-
function unexpectedErrorCallback()
{
fail('unexpectedErrorCallback');
}
-function deleteAllObjectStores(db)
-{
- objectStores = db.objectStores;
- for (var i = 0; i < objectStores.length; ++i)
- db.removeObjectStore(objectStores[i]);
-}
-
// The following functions are based on
// WebKit/LayoutTests/fast/js/resources/js-test-pre.js
// so that the tests will look similar to the existing layout tests.
@@ -91,8 +79,3 @@ function shouldBeTrue(_a) { shouldBe(_a, "true"); }
function shouldBeFalse(_a) { shouldBe(_a, "false"); }
function shouldBeNaN(_a) { shouldBe(_a, "NaN"); }
function shouldBeNull(_a) { shouldBe(_a, "null"); }
-function shouldBeEqualToString(a, b)
-{
- var unevaledString = '"' + b.replace(/\\/g, "\\\\").replace(/"/g, "\"") + '"';
- shouldBe(a, unevaledString);
-}
diff --git a/chrome/test/data/indexeddb/transaction_get_test.html b/chrome/test/data/indexeddb/transaction_get_test.html
deleted file mode 100644
index edc1e0f..0000000
--- a/chrome/test/data/indexeddb/transaction_get_test.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
- <head>
- <title>IndexedDB transaction get test</title>
- <script type="text/javascript" src="common.js"></script>
- <script type="text/javascript" src="transaction_get_test.js"></script>
- </head>
- <body onLoad="test()">
- <div id="status">Starting...</div>
- </body>
-</html>
diff --git a/chrome/test/data/indexeddb/transaction_get_test.js b/chrome/test/data/indexeddb/transaction_get_test.js
deleted file mode 100644
index e9c992a..0000000
--- a/chrome/test/data/indexeddb/transaction_get_test.js
+++ /dev/null
@@ -1,70 +0,0 @@
-function afterCommit()
-{
- try {
- debug("Accessing a committed transaction should throw");
- var store = transaction.objectStore('storeName');
- } catch (e) {
- exc = e;
- shouldBe('exc.code', '9');
- }
- done();
-}
-
-function nonExistingKey()
-{
- window.setTimeout('afterCommit()', 0);
-}
-
-function gotValue()
-{
- value = event.result;
- shouldBeEqualToString('value', 'myValue');
-}
-
-function startTransaction()
-{
- debug("Using get in a transaction");
- transaction = db.transaction();
- //transaction.onabort = unexpectedErrorCallback;
- store = transaction.objectStore('storeName');
- shouldBeEqualToString("store.name", "storeName");
- result = store.get('myKey');
- result.onsuccess = gotValue;
- result.onerror = unexpectedErrorCallback;
-
- var emptyResult = store.get('nonExistingKey');
- emptyResult.onsuccess = unexpectedSuccessCallback;
- emptyResult.onerror = nonExistingKey;
-}
-
-function populateObjectStore(objectStore)
-{
- result = objectStore.add('myValue', 'myKey');
- result.onsuccess = startTransaction;
-}
-
-function createObjectStoreSuccess()
-{
- var objectStore = event.result;
- populateObjectStore(objectStore);
-}
-
-function openSuccess()
-{
- db = event.result;
-
- deleteAllObjectStores(db);
-
- result = db.createObjectStore('storeName');
- result.onsuccess = createObjectStoreSuccess;
- result.onerror = unexpectedErrorCallback;
-}
-
-function test()
-{
- result = indexedDB.open('name', 'description');
- result.onsuccess = openSuccess;
- result.onerror = unexpectedErrorCallback;
-}
-
-test();