OLD | NEW |
1 document.getElementById("description").innerHTML = "Tests that we clone object h
ierarchies"; | 1 document.getElementById("description").innerHTML = "Tests that we clone object h
ierarchies"; |
2 | 2 |
3 tryPostMessage('null'); | 3 tryPostMessage('null'); |
4 tryPostMessage('undefined'); | 4 tryPostMessage('undefined'); |
5 tryPostMessage('1'); | 5 tryPostMessage('1'); |
6 tryPostMessage('true'); | 6 tryPostMessage('true'); |
7 tryPostMessage('"1"'); | 7 tryPostMessage('"1"'); |
8 tryPostMessage('({})'); | 8 tryPostMessage('({})'); |
9 tryPostMessage('({a:1})'); | 9 tryPostMessage('({a:1})'); |
10 tryPostMessage('({a:"a"})'); | 10 tryPostMessage('({a:"a"})'); |
11 tryPostMessage('({b:"a", a:"b"})'); | 11 tryPostMessage('({b:"a", a:"b"})'); |
12 tryPostMessage('({p0:"string0", p1:"string1", p2:"string2", p3:"string3", p4:"st
ring4", p5:"string5", p6:"string6", p7:"string7", p8:"string8", p9:"string9", p1
0:"string10", p11:"string11", p12:"string12", p13:"string13", p14:"string14", p1
5:"string15", p16:"string16", p17:"string17", p18:"string18", p19:"string19"})')
; | 12 tryPostMessage('({p0:"string0", p1:"string1", p2:"string2", p3:"string3", p4:"st
ring4", p5:"string5", p6:"string6", p7:"string7", p8:"string8", p9:"string9", p1
0:"string10", p11:"string11", p12:"string12", p13:"string13", p14:"string14", p1
5:"string15", p16:"string16", p17:"string17", p18:"string18", p19:"string19"})')
; |
13 tryPostMessage('({p0:"string1", p1:"string1", p2:"string2", p3:"string3", p4:"st
ring4", p5:"string5", p6:"string6", p7:"string7", p8:"string8", p9:"string9", p1
0:"string10", p11:"string11", p12:"string12", p13:"string13", p14:"string14", p1
5:"string15", p16:"string16", p17:"string17", p18:"string18", p19:"string19"})')
; | 13 tryPostMessage('({p0:"string1", p1:"string1", p2:"string2", p3:"string3", p4:"st
ring4", p5:"string5", p6:"string6", p7:"string7", p8:"string8", p9:"string9", p1
0:"string10", p11:"string11", p12:"string12", p13:"string13", p14:"string14", p1
5:"string15", p16:"string16", p17:"string17", p18:"string18", p19:"string19"})')
; |
14 tryPostMessage('({a:""})'); | 14 tryPostMessage('({a:""})'); |
15 tryPostMessage('({a:0})'); | 15 tryPostMessage('({a:0})'); |
16 tryPostMessage('({a:1})'); | 16 tryPostMessage('({a:1})'); |
17 tryPostMessage('[]'); | 17 tryPostMessage('[]'); |
18 tryPostMessage('["a", "a", "b", "a", "b"]'); | 18 tryPostMessage('["a", "a", "b", "a", "b"]'); |
19 tryPostMessage('["a", "a", "b", {a:"b", b:"a"}]'); | 19 tryPostMessage('["a", "a", "b", {a:"b", b:"a"}]'); |
20 tryPostMessage('[1,2,3]'); | 20 tryPostMessage('[1,2,3]'); |
21 tryPostMessage('[,,1]'); | 21 tryPostMessage('[,,1]'); |
22 tryPostMessage('(function(){})', true, null, DOMException.DATA_CLONE_ERR); | 22 tryPostMessage('(function(){})', true, null, DOMException.DATA_CLONE_ERR); |
23 tryPostMessage('var x = 0; try { eval("badref"); } catch(e) { x = e; } x', true,
null, DOMException.DATA_CLONE_ERR); | 23 tryPostMessage('var x = 0; try { eval("badref"); } catch(e) { x = e; } x', true,
null, DOMException.DATA_CLONE_ERR); |
24 var arrayBuffer = new ArrayBuffer(1); | 24 var arrayBuffer = new ArrayBuffer(1); |
25 tryPostMessage('"data"', false, null, 0, [arrayBuffer]); | 25 tryPostMessage('"data"', false, null, 0, [arrayBuffer]); |
26 tryPostMessage('arrayBuffer', true, null, DOMException.DATA_CLONE_ERR); | 26 tryPostMessage('arrayBuffer', true, null, DOMException.DATA_CLONE_ERR); |
| 27 var duplicateArrayBuffer = new ArrayBuffer(1); |
| 28 tryPostMessage('"data"', true, null, DOMException.DATA_CLONE_ERR, [duplicateArra
yBuffer, duplicateArrayBuffer]); |
27 var uint8Array = new Uint8Array([10]); | 29 var uint8Array = new Uint8Array([10]); |
28 tryPostMessage('"data"', false, null, 0, [uint8Array.buffer]); | 30 tryPostMessage('"data"', false, null, 0, [uint8Array.buffer]); |
29 tryPostMessage('uint8Array', true, null, DOMException.DATA_CLONE_ERR); | 31 tryPostMessage('uint8Array', true, null, DOMException.DATA_CLONE_ERR); |
30 tryPostMessage('new Date(1234567890000)'); | 32 tryPostMessage('new Date(1234567890000)'); |
31 tryPostMessage('new ConstructorWithPrototype("foo")', false, '({field:"foo"})'); | 33 tryPostMessage('new ConstructorWithPrototype("foo")', false, '({field:"foo"})'); |
32 tryPostMessage('new Boolean(true)'); | 34 tryPostMessage('new Boolean(true)'); |
33 tryPostMessage('new Boolean(false)'); | 35 tryPostMessage('new Boolean(false)'); |
34 tryPostMessage('new String("gnirts")'); | 36 tryPostMessage('new String("gnirts")'); |
35 tryPostMessage('new Number(42.0)'); | 37 tryPostMessage('new Number(42.0)'); |
36 cyclicObject={}; | 38 cyclicObject={}; |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 doPassFail(v[0].length === window.fileList.length, "FileList length
sent correctly"); | 334 doPassFail(v[0].length === window.fileList.length, "FileList length
sent correctly"); |
333 doPassFail(v[0][0] !== v[1], "FileList should not respect reference
equality (0)"); | 335 doPassFail(v[0][0] !== v[1], "FileList should not respect reference
equality (0)"); |
334 doPassFail(v[0][1] !== v[2], "FileList should not respect reference
equality (1)"); | 336 doPassFail(v[0][1] !== v[2], "FileList should not respect reference
equality (1)"); |
335 doPassFail(v[0][0].name == window.file0.name, "FileList preserves or
der and data (name0)"); | 337 doPassFail(v[0][0].name == window.file0.name, "FileList preserves or
der and data (name0)"); |
336 doPassFail(v[0][1].name == window.file1.name, "FileList preserves or
der and data (name1)"); | 338 doPassFail(v[0][1].name == window.file1.name, "FileList preserves or
der and data (name1)"); |
337 doPassFail(equal(v[0][0].lastModifiedDate, window.file0.lastModified
Date), "FileList preserves order and data (date0)"); | 339 doPassFail(equal(v[0][0].lastModifiedDate, window.file0.lastModified
Date), "FileList preserves order and data (date0)"); |
338 doPassFail(equal(v[0][1].lastModifiedDate, window.file1.lastModified
Date), "FileList preserves order and data (date1)"); | 340 doPassFail(equal(v[0][1].lastModifiedDate, window.file1.lastModified
Date), "FileList preserves order and data (date1)"); |
339 }); | 341 }); |
340 } | 342 } |
341 tryPostMessage('"done"'); | 343 tryPostMessage('"done"'); |
OLD | NEW |