Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: LayoutTests/fast/canvas/webgl/array-unit-tests.html

Issue 19230002: Use V8 implementation of TypedArrays and DataView in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: More copyright notices fixed. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <link rel="stylesheet" href="../../resources/js-test-style.css"/> 5 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
6 <script src="../../js/resources/js-test-pre.js"></script> 6 <script src="../../js/resources/js-test-pre.js"></script>
7 <script src="resources/webgl-test.js"></script> 7 <script src="resources/webgl-test.js"></script>
8 <script src="resources/typed-array-test-cases.js"></script> 8 <script src="resources/typed-array-test-cases.js"></script>
9 </head> 9 </head>
10 <body> 10 <body>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 function testInheritanceHierarchy() { 117 function testInheritanceHierarchy() {
118 debug('test inheritance hierarchy of typed array views'); 118 debug('test inheritance hierarchy of typed array views');
119 119
120 try { 120 try {
121 var foo = ArrayBufferView; 121 var foo = ArrayBufferView;
122 testFailed('ArrayBufferView has [NoInterfaceObject] extended attribute and s hould not be defined'); 122 testFailed('ArrayBufferView has [NoInterfaceObject] extended attribute and s hould not be defined');
123 } catch (e) { 123 } catch (e) {
124 testPassed('ArrayBufferView has [NoInterfaceObject] extended attribute and w as (correctly) not defined'); 124 testPassed('ArrayBufferView has [NoInterfaceObject] extended attribute and w as (correctly) not defined');
125 } 125 }
126
127 // There is currently only one kind of view that inherits from another
128 shouldBe('new Uint8ClampedArray(1) instanceof Uint8Array', 'true');
Ken Russell (switch to Gerrit) 2013/07/19 20:31:36 Now that this has been resolved via offline discus
129 } 126 }
130 127
131 // 128 //
132 // Tests for unsigned array variants 129 // Tests for unsigned array variants
133 // 130 //
134 131
135 function testSetAndGet10To1(type, name) { 132 function testSetAndGet10To1(type, name) {
136 running('test ' + name + ' SetAndGet10To1'); 133 running('test ' + name + ' SetAndGet10To1');
137 try { 134 try {
138 var array = new type(10); 135 var array = new type(10);
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 638
642 function testConstructionWithUnalignedLength(type, name, elementSizeInBytes) { 639 function testConstructionWithUnalignedLength(type, name, elementSizeInBytes) {
643 if (elementSizeInBytes > 1) { 640 if (elementSizeInBytes > 1) {
644 shouldThrowIndexSizeErr(function() { 641 shouldThrowIndexSizeErr(function() {
645 var buffer = new ArrayBuffer(elementSizeInBytes + 1); 642 var buffer = new ArrayBuffer(elementSizeInBytes + 1);
646 var array = new type(buffer, 0); 643 var array = new type(buffer, 0);
647 }, "Construction of " + name + " with unaligned length"); 644 }, "Construction of " + name + " with unaligned length");
648 } 645 }
649 } 646 }
650 647
651 function testConstructionOfHugeArray(type, name, sz) { 648 function testConstructionOfHugeArray(type, name, sz) {
Ken Russell (switch to Gerrit) 2013/07/20 01:37:45 This should be deleted.
652 if (sz == 1) 649 if (sz == 1)
653 return; 650 return;
654 try { 651 try {
655 // Construction of huge arrays must fail because byteLength is 652 // Construction of huge arrays must fail because byteLength is
656 // an unsigned long 653 // an unsigned long
657 array = new type(3000000000); 654 array = new type(3000000000);
658 testFailed("Construction of huge " + name + " should throw exception"); 655 testFailed("Construction of huge " + name + " should throw exception");
659 } catch (e) { 656 } catch (e) {
660 testPassed("Construction of huge " + name + " threw exception"); 657 testPassed("Construction of huge " + name + " threw exception");
661 } 658 }
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 testConstructionBoundaryConditions(type, 993 testConstructionBoundaryConditions(type,
997 name, 994 name,
998 testCase.testValues, 995 testCase.testValues,
999 testCase.expectedValues); 996 testCase.expectedValues);
1000 testConstructionWithNullBuffer(type, name); 997 testConstructionWithNullBuffer(type, name);
1001 testConstructionWithExceptionThrowingObject(type, name); 998 testConstructionWithExceptionThrowingObject(type, name);
1002 testConstructionWithOutOfRangeValues(type, name); 999 testConstructionWithOutOfRangeValues(type, name);
1003 testConstructionWithNegativeOutOfRangeValues(type, name); 1000 testConstructionWithNegativeOutOfRangeValues(type, name);
1004 testConstructionWithUnalignedOffset(type, name, testCase.elementSizeInBytes) ; 1001 testConstructionWithUnalignedOffset(type, name, testCase.elementSizeInBytes) ;
1005 testConstructionWithUnalignedLength(type, name, testCase.elementSizeInBytes) ; 1002 testConstructionWithUnalignedLength(type, name, testCase.elementSizeInBytes) ;
1006 testConstructionOfHugeArray(type, name, testCase.elementSizeInBytes);
1007 testConstructionWithBothArrayBufferAndLength(type, name, testCase.elementSiz eInBytes); 1003 testConstructionWithBothArrayBufferAndLength(type, name, testCase.elementSiz eInBytes);
1008 testConstructionWithSubPortionOfArrayBuffer(type, name, testCase.elementSize InBytes); 1004 testConstructionWithSubPortionOfArrayBuffer(type, name, testCase.elementSize InBytes);
1009 testSubarrayWithOutOfRangeValues(type, name, testCase.elementSizeInBytes); 1005 testSubarrayWithOutOfRangeValues(type, name, testCase.elementSizeInBytes);
1010 testSubarrayWithDefaultValues(type, name, testCase.elementSizeInBytes); 1006 testSubarrayWithDefaultValues(type, name, testCase.elementSizeInBytes);
1011 testSettingFromArrayWithOutOfRangeOffset(type, name); 1007 testSettingFromArrayWithOutOfRangeOffset(type, name);
1012 testSettingFromTypedArrayWithOutOfRangeOffset(type, name); 1008 testSettingFromTypedArrayWithOutOfRangeOffset(type, name);
1013 testSettingFromArrayWithNegativeOffset(type, name); 1009 testSettingFromArrayWithNegativeOffset(type, name);
1014 testSettingFromTypedArrayWithNegativeOffset(type, name); 1010 testSettingFromTypedArrayWithNegativeOffset(type, name);
1015 testSettingFromArrayWithMinusZeroOffset(type, name); 1011 testSettingFromArrayWithMinusZeroOffset(type, name);
1016 testSettingFromTypedArrayWithMinusZeroOffset(type, name); 1012 testSettingFromTypedArrayWithMinusZeroOffset(type, name);
(...skipping 10 matching lines...) Expand all
1027 } 1023 }
1028 1024
1029 runTests(); 1025 runTests();
1030 var successfullyParsed = true; 1026 var successfullyParsed = true;
1031 1027
1032 </script> 1028 </script>
1033 <script src="../../js/resources/js-test-post.js"></script> 1029 <script src="../../js/resources/js-test-post.js"></script>
1034 1030
1035 </body> 1031 </body>
1036 </html> 1032 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698