Title: [144724] trunk/LayoutTests
Revision
144724
Author
[email protected]
Date
2013-03-04 22:31:42 -0800 (Mon, 04 Mar 2013)

Log Message

[V8] Add LayoutTests for SerializedScriptValue Int32/Uint32 cases
https://bugs.webkit.org/show_bug.cgi?id=111364

Reviewed by Kentaro Hara.

A lack of layout tests for SerializedScriptValue special cases let
crbug.com/179280 slip in and out un-noticed. Rectify the situation.

* platform/chromium/fast/storage/serialized-script-value-expected.txt:
* platform/chromium/fast/storage/serialized-script-value.html:
* storage/indexeddb/structured-clone-expected.txt:
* storage/indexeddb/structured-clone.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (144723 => 144724)


--- trunk/LayoutTests/ChangeLog	2013-03-05 06:14:18 UTC (rev 144723)
+++ trunk/LayoutTests/ChangeLog	2013-03-05 06:31:42 UTC (rev 144724)
@@ -1,3 +1,18 @@
+2013-03-04  Joshua Bell  <[email protected]>
+
+        [V8] Add LayoutTests for SerializedScriptValue Int32/Uint32 cases
+        https://bugs.webkit.org/show_bug.cgi?id=111364
+
+        Reviewed by Kentaro Hara.
+
+        A lack of layout tests for SerializedScriptValue special cases let
+        crbug.com/179280 slip in and out un-noticed. Rectify the situation.
+
+        * platform/chromium/fast/storage/serialized-script-value-expected.txt:
+        * platform/chromium/fast/storage/serialized-script-value.html:
+        * storage/indexeddb/structured-clone-expected.txt:
+        * storage/indexeddb/structured-clone.html:
+
 2013-03-04  Brandon Jones  <[email protected]>
 
         WEBGL_compressed_texture_atc implementation

Modified: trunk/LayoutTests/platform/chromium/fast/storage/serialized-script-value-expected.txt (144723 => 144724)


--- trunk/LayoutTests/platform/chromium/fast/storage/serialized-script-value-expected.txt	2013-03-05 06:14:18 UTC (rev 144723)
+++ trunk/LayoutTests/platform/chromium/fast/storage/serialized-script-value-expected.txt	2013-03-05 06:31:42 UTC (rev 144724)
@@ -89,6 +89,30 @@
 Serialize 1.23:
 PASS bufferView.length is expectedBufferValues.length
 
+Deserialize to 2147483647:
+PASS JSON.stringify(newObj) is JSON.stringify(obj)
+PASS areValuesIdentical(newObj, obj) is true
+Serialize 2147483647:
+PASS bufferView.length is expectedBufferValues.length
+
+Deserialize to -2147483648:
+PASS JSON.stringify(newObj) is JSON.stringify(obj)
+PASS areValuesIdentical(newObj, obj) is true
+Serialize -2147483648:
+PASS bufferView.length is expectedBufferValues.length
+
+Deserialize to 2147483648:
+PASS JSON.stringify(newObj) is JSON.stringify(obj)
+PASS areValuesIdentical(newObj, obj) is true
+Serialize 2147483648:
+PASS bufferView.length is expectedBufferValues.length
+
+Deserialize to 4294967295:
+PASS JSON.stringify(newObj) is JSON.stringify(obj)
+PASS areValuesIdentical(newObj, obj) is true
+Serialize 4294967295:
+PASS bufferView.length is expectedBufferValues.length
+
 Deserialize to "":
 PASS JSON.stringify(newObj) is JSON.stringify(obj)
 PASS areValuesIdentical(newObj, obj) is true

Modified: trunk/LayoutTests/platform/chromium/fast/storage/serialized-script-value.html (144723 => 144724)


--- trunk/LayoutTests/platform/chromium/fast/storage/serialized-script-value.html	2013-03-05 06:14:18 UTC (rev 144723)
+++ trunk/LayoutTests/platform/chromium/fast/storage/serialized-script-value.html	2013-03-05 06:31:42 UTC (rev 144724)
@@ -55,6 +55,13 @@
 testSerialization(Math.pow(2,55), [0x02ff, 0x003f, 0x004e, 0x0000, 0x0000,
                                    0x6000, 0x0043]);
 testSerialization(1.23, [0x02ff, 0x003f, 0xae4e, 0xe147, 0x147a, 0xf3ae, 0x003f]);
+
+// Exercise special cases for Int32/Uint32.
+testSerialization( 0x7fffffff, [0x02ff, 0x003f, 0xfe49, 0xffff, 0x0fff]);
+testSerialization(-0x80000000, [0x02ff, 0x003f, 0xff49, 0xffff, 0x0fff]);
+testSerialization( 0x80000000, [0x02ff, 0x003f, 0x8055, 0x8080, 0x0880]);
+testSerialization( 0xffffffff, [0x02ff, 0x003f, 0xff55, 0xffff, 0x0fff]);
+
 testSerialization("", [0x02ff, 0x003f, 0x0053]);
 testSerialization("abc", [0x02ff, 0x003f, 0x0353, 0x6261, 0x0063]);
 testSerialization({integer: 123}, [0x02ff, 0x003f, 0x3f6f, 0x5301, 0x6907,

Modified: trunk/LayoutTests/storage/indexeddb/structured-clone-expected.txt (144723 => 144724)


--- trunk/LayoutTests/storage/indexeddb/structured-clone-expected.txt	2013-03-05 06:14:18 UTC (rev 144723)
+++ trunk/LayoutTests/storage/indexeddb/structured-clone-expected.txt	2013-03-05 06:31:42 UTC (rev 144724)
@@ -70,6 +70,34 @@
 store.get('key')
 PASS is(test_data, result) is true
 
+Testing: -0xffffffff
+transaction = db.transaction('storeName', 'readwrite')
+store = transaction.objectStore('storeName')
+store.put(value, 'key')
+store.get('key')
+PASS is(test_data, result) is true
+
+Testing: -0x80000000
+transaction = db.transaction('storeName', 'readwrite')
+store = transaction.objectStore('storeName')
+store.put(value, 'key')
+store.get('key')
+PASS is(test_data, result) is true
+
+Testing: -0x7fffffff
+transaction = db.transaction('storeName', 'readwrite')
+store = transaction.objectStore('storeName')
+store.put(value, 'key')
+store.get('key')
+PASS is(test_data, result) is true
+
+Testing: -1
+transaction = db.transaction('storeName', 'readwrite')
+store = transaction.objectStore('storeName')
+store.put(value, 'key')
+store.get('key')
+PASS is(test_data, result) is true
+
 Testing: -Number.MIN_VALUE
 transaction = db.transaction('storeName', 'readwrite')
 store = transaction.objectStore('storeName')
@@ -91,6 +119,13 @@
 store.get('key')
 PASS is(test_data, result) is true
 
+Testing: 1
+transaction = db.transaction('storeName', 'readwrite')
+store = transaction.objectStore('storeName')
+store.put(value, 'key')
+store.get('key')
+PASS is(test_data, result) is true
+
 Testing: Number.MIN_VALUE
 transaction = db.transaction('storeName', 'readwrite')
 store = transaction.objectStore('storeName')
@@ -98,6 +133,27 @@
 store.get('key')
 PASS is(test_data, result) is true
 
+Testing: 0x7fffffff
+transaction = db.transaction('storeName', 'readwrite')
+store = transaction.objectStore('storeName')
+store.put(value, 'key')
+store.get('key')
+PASS is(test_data, result) is true
+
+Testing: 0x80000000
+transaction = db.transaction('storeName', 'readwrite')
+store = transaction.objectStore('storeName')
+store.put(value, 'key')
+store.get('key')
+PASS is(test_data, result) is true
+
+Testing: 0xffffffff
+transaction = db.transaction('storeName', 'readwrite')
+store = transaction.objectStore('storeName')
+store.put(value, 'key')
+store.get('key')
+PASS is(test_data, result) is true
+
 Testing: Number.MAX_VALUE
 transaction = db.transaction('storeName', 'readwrite')
 store = transaction.objectStore('storeName')

Modified: trunk/LayoutTests/storage/indexeddb/structured-clone.html (144723 => 144724)


--- trunk/LayoutTests/storage/indexeddb/structured-clone.html	2013-03-05 06:14:18 UTC (rev 144723)
+++ trunk/LayoutTests/storage/indexeddb/structured-clone.html	2013-03-05 06:31:42 UTC (rev 144724)
@@ -205,10 +205,18 @@
         "NaN",
         "-Infinity",
         "-Number.MAX_VALUE",
+        "-0xffffffff",
+        "-0x80000000",
+        "-0x7fffffff",
+        "-1",
         "-Number.MIN_VALUE",
         "-0",
         "0",
+        "1",
         "Number.MIN_VALUE",
+        "0x7fffffff",
+        "0x80000000",
+        "0xffffffff",
         "Number.MAX_VALUE",
         "Infinity"
     ], callback);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to