Title: [89506] trunk
Revision
89506
Author
[email protected]
Date
2011-06-22 17:57:42 -0700 (Wed, 22 Jun 2011)

Log Message

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

        Reviewed by Adam Barth.

        IndexedDB open (database) should NOT throw if name is null
        https://bugs.webkit.org/show_bug.cgi?id=63110

        * storage/indexeddb/database-name-undefined-expected.txt:
        * storage/indexeddb/database-name-undefined.html: removed some code here
        because it's duplicated in the mozilla/open-database-null-name test
        * storage/indexeddb/mozilla/open-database-null-name-expected.txt:
        * storage/indexeddb/mozilla/open-database-null-name.html: fixed expected
        behavior (db.name ends up as four-character string "null")
2011-06-22  Mark Pilgrim  <[email protected]>

        Reviewed by Adam Barth.

        IndexedDB open (database) should NOT throw if name is null
        https://bugs.webkit.org/show_bug.cgi?id=63110

        * storage/IDBFactory.idl: remove ConvertNullToNullString flag on
        name argument, let IDL code generator stringify null value to "null"

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (89505 => 89506)


--- trunk/LayoutTests/ChangeLog	2011-06-23 00:45:26 UTC (rev 89505)
+++ trunk/LayoutTests/ChangeLog	2011-06-23 00:57:42 UTC (rev 89506)
@@ -1,3 +1,17 @@
+2011-06-22  Mark Pilgrim  <[email protected]>
+
+        Reviewed by Adam Barth.
+
+        IndexedDB open (database) should NOT throw if name is null
+        https://bugs.webkit.org/show_bug.cgi?id=63110
+
+        * storage/indexeddb/database-name-undefined-expected.txt:
+        * storage/indexeddb/database-name-undefined.html: removed some code here
+        because it's duplicated in the mozilla/open-database-null-name test
+        * storage/indexeddb/mozilla/open-database-null-name-expected.txt:
+        * storage/indexeddb/mozilla/open-database-null-name.html: fixed expected
+        behavior (db.name ends up as four-character string "null")
+
 2011-06-22  Nate Chapin  <[email protected]>
 
         Reviewed by Adam Barth.

Modified: trunk/LayoutTests/storage/indexeddb/database-name-undefined-expected.txt (89505 => 89506)


--- trunk/LayoutTests/storage/indexeddb/database-name-undefined-expected.txt	2011-06-23 00:45:26 UTC (rev 89505)
+++ trunk/LayoutTests/storage/indexeddb/database-name-undefined-expected.txt	2011-06-23 00:57:42 UTC (rev 89506)
@@ -12,7 +12,6 @@
 IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
 PASS IDBKeyRange == null is false
 PASS indexedDB.open(); threw exception TypeError: Not enough arguments.
-PASS indexedDB.open(null); threw exception Error: NON_TRANSIENT_ERR: DOM IDBDatabase Exception 2.
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/storage/indexeddb/database-name-undefined.html (89505 => 89506)


--- trunk/LayoutTests/storage/indexeddb/database-name-undefined.html	2011-06-23 00:45:26 UTC (rev 89505)
+++ trunk/LayoutTests/storage/indexeddb/database-name-undefined.html	2011-06-23 00:57:42 UTC (rev 89506)
@@ -27,7 +27,6 @@
     shouldBeFalse("IDBKeyRange == null");
 
     shouldThrow("indexedDB.open();");
-    shouldThrow("indexedDB.open(null);");
     done();
 }
 

Modified: trunk/LayoutTests/storage/indexeddb/mozilla/open-database-null-name-expected.txt (89505 => 89506)


--- trunk/LayoutTests/storage/indexeddb/mozilla/open-database-null-name-expected.txt	2011-06-23 00:45:26 UTC (rev 89505)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/open-database-null-name-expected.txt	2011-06-23 00:57:42 UTC (rev 89506)
@@ -1,4 +1,4 @@
-Test IndexedDB: should throw when opening a database with a null name
+Test IndexedDB: should NOT throw when opening a database with a null name
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
@@ -9,9 +9,9 @@
 PASS IDBDatabaseException == null is false
 IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
 PASS IDBTransaction == null is false
-Expecting exception from indexedDB.open(null, description)
-PASS Exception was thrown.
-PASS code is IDBDatabaseException.NON_TRANSIENT_ERR
+indexedDB.open(null);
+db = event.target.result
+PASS db.name is 'null'
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/storage/indexeddb/mozilla/open-database-null-name.html (89505 => 89506)


--- trunk/LayoutTests/storage/indexeddb/mozilla/open-database-null-name.html	2011-06-23 00:45:26 UTC (rev 89505)
+++ trunk/LayoutTests/storage/indexeddb/mozilla/open-database-null-name.html	2011-06-23 00:57:42 UTC (rev 89506)
@@ -17,7 +17,7 @@
 <div id="console"></div>
 <script>
 
-description("Test IndexedDB: should throw when opening a database with a null name");
+description("Test IndexedDB: should NOT throw when opening a database with a null name");
 if (window.layoutTestController)
     layoutTestController.waitUntilDone();
 
@@ -31,7 +31,15 @@
     shouldBeFalse("IDBTransaction == null");
 
     description = "My Test Database";
-    evalAndExpectException("indexedDB.open(null, description)", "IDBDatabaseException.NON_TRANSIENT_ERR");
+    request = evalAndLog("indexedDB.open(null);");
+    request._onsuccess_ = openSuccess;
+    request._onerror_ = unexpectedErrorCallback;
+}
+
+function openSuccess()
+{
+    db = evalAndLog("db = event.target.result");
+    shouldBe("db.name", "'null'");
     done();
 }
 

Modified: trunk/Source/WebCore/ChangeLog (89505 => 89506)


--- trunk/Source/WebCore/ChangeLog	2011-06-23 00:45:26 UTC (rev 89505)
+++ trunk/Source/WebCore/ChangeLog	2011-06-23 00:57:42 UTC (rev 89506)
@@ -1,3 +1,13 @@
+2011-06-22  Mark Pilgrim  <[email protected]>
+
+        Reviewed by Adam Barth.
+
+        IndexedDB open (database) should NOT throw if name is null
+        https://bugs.webkit.org/show_bug.cgi?id=63110
+
+        * storage/IDBFactory.idl: remove ConvertNullToNullString flag on
+        name argument, let IDL code generator stringify null value to "null"
+
 2011-06-22  Ryosuke Niwa  <[email protected]>
 
         Reviewed by Darin Adler.

Modified: trunk/Source/WebCore/storage/IDBFactory.idl (89505 => 89506)


--- trunk/Source/WebCore/storage/IDBFactory.idl	2011-06-23 00:45:26 UTC (rev 89505)
+++ trunk/Source/WebCore/storage/IDBFactory.idl	2011-06-23 00:57:42 UTC (rev 89506)
@@ -28,7 +28,7 @@
     interface [
         Conditional=INDEXED_DATABASE
     ] IDBFactory {
-        [CallWith=ScriptExecutionContext] IDBRequest open(in [ConvertNullToNullString] DOMString name)
+        [CallWith=ScriptExecutionContext] IDBRequest open(in DOMString name)
             raises (IDBDatabaseException);
     };
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to