OLD | NEW |
1 Test structured clone permutations in IndexedDB. File/FileList tests require Dum
pRenderTree. | 1 Test structured clone permutations in IndexedDB. File/FileList tests require Dum
pRenderTree. |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; | 6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; |
7 | 7 |
8 dbname = "structured-clone.html" | 8 dbname = "structured-clone.html" |
9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 store.put(value, 'key') | 574 store.put(value, 'key') |
575 store.get('key') | 575 store.get('key') |
576 PASS test_data !== result is true | 576 PASS test_data !== result is true |
577 PASS Object.prototype.toString.call(result) is "[object ImageData]" | 577 PASS Object.prototype.toString.call(result) is "[object ImageData]" |
578 PASS result.width is test_data.width | 578 PASS result.width is test_data.width |
579 PASS result.height is test_data.height | 579 PASS result.height is test_data.height |
580 PASS result.data.length is test_data.data.length | 580 PASS result.data.length is test_data.data.length |
581 PASS result data matches | 581 PASS result data matches |
582 | 582 |
583 Testing Blob | 583 Testing Blob |
584 Skipping test | 584 PASS FileReader != null is true |
| 585 test_content = 'This is a test. This is only a test.' |
| 586 test_data = new Blob([test_content]) |
| 587 transaction = db.transaction('storeName', 'readwrite') |
| 588 store = transaction.objectStore('storeName') |
| 589 store.put(value, 'key') |
| 590 store.get('key') |
| 591 PASS test_data !== result is true |
| 592 PASS Object.prototype.toString.call(result) is "[object Blob]" |
| 593 PASS result.size is test_data.size |
| 594 PASS result.type is test_data.type |
| 595 PASS text is "This is a test. This is only a test." |
585 | 596 |
586 Testing File | 597 Testing File |
587 Skipping test | 598 test_content = fileInput.files[0] |
| 599 transaction = db.transaction('storeName', 'readwrite') |
| 600 store = transaction.objectStore('storeName') |
| 601 store.put(value, 'key') |
| 602 store.get('key') |
| 603 PASS file1 !== file2 is true |
| 604 PASS Object.prototype.toString.call(file1) is "[object File]" |
| 605 PASS Object.prototype.toString.call(file2) is "[object File]" |
| 606 file1.size: 102 |
| 607 PASS file1.size is file2.size |
| 608 file1.type: text/html |
| 609 PASS file1.type is file2.type |
| 610 file1.name: test-data.html |
| 611 PASS file1.name is file2.name |
| 612 PASS String(file1.lastModifiedDate) is String(file2.lastModifiedDate) |
| 613 PASS text2 is "<!DOCTYPE html>\n<title>This is some test data</title>\n<h1>Test
data!</h1>\n<p>Get your test data here!\n" |
588 | 614 |
589 Testing FileList | 615 Testing FileList |
590 Skipping test | 616 test_content = fileInput.files |
| 617 transaction = db.transaction('storeName', 'readwrite') |
| 618 store = transaction.objectStore('storeName') |
| 619 store.put(value, 'key') |
| 620 store.get('key') |
| 621 PASS test_data !== result is true |
| 622 PASS Object.prototype.toString.call(result) is "[object FileList]" |
| 623 PASS result.length is test_data.length |
| 624 comparing file[0] |
| 625 PASS file1 !== file2 is true |
| 626 PASS Object.prototype.toString.call(file1) is "[object File]" |
| 627 PASS Object.prototype.toString.call(file2) is "[object File]" |
| 628 file1.size: 102 |
| 629 PASS file1.size is file2.size |
| 630 file1.type: text/html |
| 631 PASS file1.type is file2.type |
| 632 file1.name: test-data.html |
| 633 PASS file1.name is file2.name |
| 634 PASS String(file1.lastModifiedDate) is String(file2.lastModifiedDate) |
| 635 PASS text2 is "<!DOCTYPE html>\n<title>This is some test data</title>\n<h1>Test
data!</h1>\n<p>Get your test data here!\n" |
| 636 comparing file[1] |
| 637 PASS file1 !== file2 is true |
| 638 PASS Object.prototype.toString.call(file1) is "[object File]" |
| 639 PASS Object.prototype.toString.call(file2) is "[object File]" |
| 640 file1.size: 502 |
| 641 PASS file1.size is file2.size |
| 642 file1.type: text/plain |
| 643 PASS file1.type is file2.type |
| 644 file1.name: test-data.txt |
| 645 PASS file1.name is file2.name |
| 646 PASS String(file1.lastModifiedDate) is String(file2.lastModifiedDate) |
| 647 PASS text2 is "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean l
aoreet dolor id urna eleifend aliquet. Nulla vel dolor ipsum. Aliquam ut turpis
nisl, in vulputate sapien. Cum sociis natoque penatibus et magnis dis parturient
montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula.
Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in condime
ntum leo neque sed nulla. Nunc quis porta elit. Pellentesque erat lectus, ultric
ies a lobortis id, faucibus id quam.\n" |
591 | 648 |
592 Testing Array | 649 Testing Array |
593 test_data = [] | 650 test_data = [] |
594 test_data[0] = 'foo' | 651 test_data[0] = 'foo' |
595 test_data[1] = 'bar' | 652 test_data[1] = 'bar' |
596 test_data[10] = true | 653 test_data[10] = true |
597 test_data[11] = false | 654 test_data[11] = false |
598 test_data[20] = 123 | 655 test_data[20] = 123 |
599 test_data[21] = 456 | 656 test_data[21] = 456 |
600 test_data[30] = null | 657 test_data[30] = null |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 PASS code is DOMException.DATA_CLONE_ERR | 856 PASS code is DOMException.DATA_CLONE_ERR |
800 Exception message: Failed to execute 'put' on 'IDBObjectStore': An object could
not be cloned. | 857 Exception message: Failed to execute 'put' on 'IDBObjectStore': An object could
not be cloned. |
801 Expecting exception from store.put(document.body, 'key') | 858 Expecting exception from store.put(document.body, 'key') |
802 PASS Exception was thrown. | 859 PASS Exception was thrown. |
803 PASS code is DOMException.DATA_CLONE_ERR | 860 PASS code is DOMException.DATA_CLONE_ERR |
804 Exception message: Failed to execute 'put' on 'IDBObjectStore': An object could
not be cloned. | 861 Exception message: Failed to execute 'put' on 'IDBObjectStore': An object could
not be cloned. |
805 PASS successfullyParsed is true | 862 PASS successfullyParsed is true |
806 | 863 |
807 TEST COMPLETE | 864 TEST COMPLETE |
808 | 865 |
OLD | NEW |