Title: [155051] trunk/LayoutTests
Revision
155051
Author
[email protected]
Date
2013-09-04 11:32:10 -0700 (Wed, 04 Sep 2013)

Log Message

Fix fast/storage/serialized script value, and add new tests for Map and Set
https://bugs.webkit.org/show_bug.cgi?id=120688

Reviewed by Steve Falkenburg.

Update for new version number, and adding binary tests for Map and Set
serialisation

* fast/storage/serialized-script-value.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (155050 => 155051)


--- trunk/LayoutTests/ChangeLog	2013-09-04 18:01:27 UTC (rev 155050)
+++ trunk/LayoutTests/ChangeLog	2013-09-04 18:32:10 UTC (rev 155051)
@@ -1,3 +1,15 @@
+2013-09-04  Oliver Hunt  <[email protected]>
+
+        Fix fast/storage/serialized script value, and add new tests for Map and Set
+        https://bugs.webkit.org/show_bug.cgi?id=120688
+
+        Reviewed by Steve Falkenburg.
+
+        Update for new version number, and adding binary tests for Map and Set
+        serialisation
+
+        * fast/storage/serialized-script-value.html:
+
 2013-09-04  Danilo Cesar Lemes de Paula  <[email protected]>
 
         [GTK] add support for subtitles on webkit2GTK

Modified: trunk/LayoutTests/fast/storage/serialized-script-value.html (155050 => 155051)


--- trunk/LayoutTests/fast/storage/serialized-script-value.html	2013-09-04 18:01:27 UTC (rev 155050)
+++ trunk/LayoutTests/fast/storage/serialized-script-value.html	2013-09-04 18:32:10 UTC (rev 155051)
@@ -17,7 +17,7 @@
 
 testSerialization({foo: 'zoo', bar: {baz: 'myNewKey'}},
 [
-    0x04, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
     0x00, 0x66, 0x00, 0x6f, 0x00, 0x6f, 0x00, 0x10,
     0x03, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x6f, 0x00,
     0x6f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x00,
@@ -43,7 +43,7 @@
 
 testSerialization({foo: 'zoo', bar: 'myNewKey'},
 [
-    0x04, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
     0x00, 0x66, 0x00, 0x6f, 0x00, 0x6f, 0x00, 0x10,
     0x03, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x6f, 0x00,
     0x6f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x00,
@@ -65,7 +65,7 @@
 
 testSerialization([],
 [
-    0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
     0x00, 0xff, 0xff, 0xff, 0xff
 ],
 [
@@ -74,7 +74,7 @@
 ]);
 testSerialization({foo: "zoo"},
 [
-    0x04, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
     0x00, 0x66, 0x00, 0x6f, 0x00, 0x6f, 0x00, 0x10,
     0x03, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x6f, 0x00,
     0x6f, 0x00, 0xff, 0xff, 0xff, 0xff
@@ -87,7 +87,7 @@
 ]);
 testSerialization({foo: null},
 [
-    0x04, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
     0x00, 0x66, 0x00, 0x6f, 0x00, 0x6f, 0x00, 0x04,
     0xff, 0xff, 0xff, 0xff
 ],
@@ -99,7 +99,7 @@
 
 testSerialization({},
 [
-    0x04, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff,
+    0x05, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff,
     0xff
 ],
 [
@@ -109,7 +109,7 @@
 
 testSerialization(undefined,
 [
-    0x04, 0x00, 0x00, 0x00, 0x03
+    0x05, 0x00, 0x00, 0x00, 0x03
 ],
 [
     0x03, 0x00, 0x00, 0x00, 0x03
@@ -123,14 +123,14 @@
 ]);
 testSerialization(false,
 [
-    0x04, 0x00, 0x00, 0x00, 0x08
+    0x05, 0x00, 0x00, 0x00, 0x08
 ],
 [
     0x03, 0x00, 0x00, 0x00, 0x08
 ]);
 testSerialization(new Array(100),
 [
-    0x04, 0x00, 0x00, 0x00, 0x01, 0x64, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x01, 0x64, 0x00, 0x00,
     0x00, 0xff, 0xff, 0xff, 0xff
 ],
 [
@@ -139,7 +139,7 @@
 ]);
 testSerialization(10,
 [
-    0x04, 0x00, 0x00, 0x00, 0x05, 0x0a, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x05, 0x0a, 0x00, 0x00,
     0x00
 ],
 [
@@ -148,7 +148,7 @@
 ]);
 testSerialization(-10,
 [
-    0x04, 0x00, 0x00, 0x00, 0x05, 0xf6, 0xff, 0xff,
+    0x05, 0x00, 0x00, 0x00, 0x05, 0xf6, 0xff, 0xff,
     0xff
 ],
 [
@@ -157,7 +157,7 @@
 ]);
 testSerialization(Math.pow(2,30),
 [
-    0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
     0x40
 ],
 [
@@ -166,7 +166,7 @@
 ]);
 testSerialization(Math.pow(2,55),
 [
-    0x04, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x60, 0x43,
 ],
 [
@@ -175,7 +175,7 @@
 ]);
 testSerialization(1.23,
 [
-    0x04, 0x00, 0x00, 0x00, 0x0a, 0xae, 0x47, 0xe1,
+    0x05, 0x00, 0x00, 0x00, 0x0a, 0xae, 0x47, 0xe1,
     0x7a, 0x14, 0xae, 0xf3, 0x3f
 ],
 [
@@ -184,14 +184,14 @@
 ]);
 testSerialization("",
 [
-    0x04, 0x00, 0x00, 0x00, 0x11
+    0x05, 0x00, 0x00, 0x00, 0x11
 ],
 [
     0x03, 0x00, 0x00, 0x00, 0x11
 ]);
 testSerialization("abc",
 [
-    0x04, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00,
     0x00, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00
 ],
 [
@@ -200,7 +200,7 @@
 ]);
 testSerialization({integer: 123},
 [
-    0x04, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00,
     0x00, 0x69, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65,
     0x00, 0x67, 0x00, 0x65, 0x00, 0x72, 0x00, 0x05,
     0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff
@@ -213,7 +213,7 @@
 ]);
 testSerialization({string: "str"},
 [
-    0x04, 0x00, 0x00, 0x00, 0x02, 0x06, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x02, 0x06, 0x00, 0x00,
     0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69,
     0x00, 0x6e, 0x00, 0x67, 0x00, 0x10, 0x03, 0x00,
     0x00, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00,
@@ -228,7 +228,7 @@
 ]);
 testSerialization({list: [1,2,3]},
 [
-    0x04, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00,
     0x00, 0x6c, 0x00, 0x69, 0x00, 0x73, 0x00, 0x74,
     0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x05,
@@ -247,14 +247,14 @@
 ]);
 testSerialization(null,
 [
-    0x04, 0x00, 0x00, 0x00, 0x04
+    0x05, 0x00, 0x00, 0x00, 0x04
 ],
 [
     0x03, 0x00, 0x00, 0x00, 0x04
 ]);
 testSerialization(/abc/,
 [
-    0x04, 0x00, 0x00, 0x00, 0x12, 0x03, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x12, 0x03, 0x00, 0x00,
     0x00, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00, 0x00,
     0x00, 0x00, 0x00
 ],
@@ -269,7 +269,7 @@
 outerObject['outer'] = innerObject;
 testSerialization(outerObject,
 [
-    0x04, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00,
     0x00, 0x69, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x65,
     0x00, 0x72, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00,
     0x68, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x6c, 0x00,
@@ -294,7 +294,7 @@
 ]);
 testSerialization(innerObject,
 [
-    0x04, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00,
     0x00, 0x68, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x6c,
     0x00, 0x6f, 0x00, 0x10, 0x05, 0x00, 0x00, 0x00,
     0x74, 0x00, 0x68, 0x00, 0x65, 0x00, 0x72, 0x00,
@@ -311,7 +311,7 @@
 var unicodeObject = {a: 'a', u: String.fromCharCode(0x03B1,0x03B2), d: 42};
 testSerialization(unicodeObject,
 [
-    0x04, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
     0x00, 0x61, 0x00, 0x10, 0xfe, 0xff, 0xff, 0xff,
     0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x00, 0x10,
     0x02, 0x00, 0x00, 0x00, 0xb1, 0x03, 0xb2, 0x03,
@@ -329,7 +329,7 @@
 unicodeObject.a = 'ab';
 testSerialization(unicodeObject,
 [
-    0x04, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
     0x00, 0x61, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00,
     0x61, 0x00, 0x62, 0x00, 0x01, 0x00, 0x00, 0x00,
     0x75, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0xb1,
@@ -355,7 +355,7 @@
 arrayObject[''] = null;
 testSerialization(arrayObject,
 [
-    0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
     0x00, 0xfd, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00,
     0x00, 0x61, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00,
     0x62, 0x00, 0x08, 0x03, 0x00, 0x00, 0x00, 0x66,
@@ -370,7 +370,7 @@
 arrayObject[1] = 'bar';
 testSerialization(arrayObject,
 [
-    0x04, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00,
     0x00, 0x00, 0x66, 0x00, 0x6f, 0x00, 0x6f, 0x00,
     0x01, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00,
@@ -383,7 +383,53 @@
     0x00, 0x04, 0xff, 0xff, 0xff, 0xff
 ]);
 
+var mapObject = new Map;
+mapObject.set(1,2)
+mapObject.set(1.5, {})
+mapObject.set(mapObject, "foo")
+mapObject.set("bar", new String("bar"))
+mapObject.expando = {};
+
+testSerialization(mapObject,
+[
+    0x05, 0x00, 0x00, 0x00, 0x1e, 0x07, 0x05, 0x02, 
+    0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 
+    0x00, 0x00, 0xf8, 0x3f, 0x02, 0xff, 0xff, 0xff, 
+    0xff, 0x13, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00, 
+    0x66, 0x00, 0x6f, 0x00, 0x6f, 0x00, 0x10, 0x03, 
+    0x00, 0x00, 0x00, 0x62, 0x00, 0x61, 0x00, 0x72, 
+    0x00, 0x1a, 0xfe, 0xff, 0xff, 0xff, 0x01, 0x1f, 
+    0x07, 0x00, 0x00, 0x00, 0x65, 0x00, 0x78, 0x00, 
+    0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 
+    0x6f, 0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 
+    0xff, 0xff, 0xff
+]);
+
+var setObject = new Set;
+setObject.add(1)
+setObject.add(1.5)
+setObject.add(setObject)
+setObject.add("bar")
+setObject.add(new String("bar"))
+setObject.expando = {};
+
+testSerialization(setObject,
+[
+    0x05, 0x00, 0x00, 0x00, 0x1d, 0x07, 0x07, 0x0a, 0x00, 
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0x0a, 0x00, 
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0x13, 0x00, 
+    0x13, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00, 0x62, 0x00, 
+    0x61, 0x00, 0x72, 0x00, 0x10, 0xfe, 0xff, 0xff, 0xff, 
+    0x00, 0x1a, 0xfe, 0xff, 0xff, 0xff, 0x00, 0x13, 0x01, 
+    0x1f, 0x07, 0x00, 0x00, 0x00, 0x65, 0x00, 0x78, 0x00, 
+    0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x6f, 
+    0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
+    0xff
+]);
+
 testSerialization(function(){}, [], null, DOMException.DATA_CLONE_ERR);
+
+successfullyParsed = true;
         </script>
         <script src=""
     </body>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to