Title: [88713] trunk/LayoutTests
Revision
88713
Author
[email protected]
Date
2011-06-13 15:29:50 -0700 (Mon, 13 Jun 2011)

Log Message

2011-06-13  Mark Pilgrim  <[email protected]>

        Reviewed by Eric Seidel.

        IndexedDB test: odd database names
        https://bugs.webkit.org/show_bug.cgi?id=62322

        * storage/indexeddb/database-odd-names-expected.txt: Added.
        * storage/indexeddb/database-odd-names.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (88712 => 88713)


--- trunk/LayoutTests/ChangeLog	2011-06-13 22:25:34 UTC (rev 88712)
+++ trunk/LayoutTests/ChangeLog	2011-06-13 22:29:50 UTC (rev 88713)
@@ -1,3 +1,13 @@
+2011-06-13  Mark Pilgrim  <[email protected]>
+
+        Reviewed by Eric Seidel.
+
+        IndexedDB test: odd database names
+        https://bugs.webkit.org/show_bug.cgi?id=62322
+
+        * storage/indexeddb/database-odd-names-expected.txt: Added.
+        * storage/indexeddb/database-odd-names.html: Added.
+
 2011-06-13  Martin Robinson  <[email protected]>
 
         Reviewed by Eric Seidel.

Added: trunk/LayoutTests/storage/indexeddb/database-odd-names-expected.txt (0 => 88713)


--- trunk/LayoutTests/storage/indexeddb/database-odd-names-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/database-odd-names-expected.txt	2011-06-13 22:29:50 UTC (rev 88713)
@@ -0,0 +1,29 @@
+Test IndexedDB odd value datatypes
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
+PASS indexedDB == null is false
+IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
+PASS IDBDatabaseException == null is false
+IDBCursor = window.IDBCursor || window.webkitIDBCursor;
+PASS IDBCursor == null is false
+IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
+PASS IDBKeyRange == null is false
+opening a database named null
+indexedDB.open(testData[nextToOpen].name, testData[nextToOpen].description)
+opening a database named faihu
+indexedDB.open(testData[nextToOpen].name, testData[nextToOpen].description)
+opening a database named unpaired surrogate
+indexedDB.open(testData[nextToOpen].name, testData[nextToOpen].description)
+opening a database named fffe
+indexedDB.open(testData[nextToOpen].name, testData[nextToOpen].description)
+opening a database named ffff
+indexedDB.open(testData[nextToOpen].name, testData[nextToOpen].description)
+opening a database named line separator
+indexedDB.open(testData[nextToOpen].name, testData[nextToOpen].description)
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/storage/indexeddb/database-odd-names.html (0 => 88713)


--- trunk/LayoutTests/storage/indexeddb/database-odd-names.html	                        (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/database-odd-names.html	2011-06-13 22:29:50 UTC (rev 88713)
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script src=""
+<script src=""
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+
+description("Test IndexedDB odd value datatypes");
+if (window.layoutTestController)
+    layoutTestController.waitUntilDone();
+
+function test()
+{
+    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
+    shouldBeFalse("indexedDB == null");
+    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
+    shouldBeFalse("IDBDatabaseException == null");
+    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
+    shouldBeFalse("IDBCursor == null");
+    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
+    shouldBeFalse("IDBKeyRange == null");
+
+    testData = [{ description: 'null',               name: '\u0000' },
+                { description: 'faihu',              name: '\ud800\udf46' },
+                { description: 'unpaired surrogate', name: '\ud800' },
+                { description: 'fffe',               name: '\ufffe' },
+                { description: 'ffff',               name: '\uffff' },
+                { description: 'line separator',     name: '\u2028' }
+    ];
+    nextToOpen = 0;
+    openNextDatabase();
+}
+
+function openNextDatabase()
+{
+    debug("opening a database named " + testData[nextToOpen].description);
+    request = evalAndLog("indexedDB.open(testData[nextToOpen].name, testData[nextToOpen].description)");
+    request._onerror_ = unexpectedErrorCallback;
+    request._onsuccess_ = ++nextToOpen < testData.length ? openNextDatabase : done;
+}
+
+var successfullyParsed = true;
+
+test();
+
+</script>
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to