[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
kbr at google.com
kbr at google.com
Wed Dec 22 11:56:51 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit ba8f4e3327fb8ea36d7f1fa2e150a24ff98144b0
Author: kbr at google.com <kbr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Aug 12 00:12:26 2010 +0000
2010-08-11 Kenneth Russell <kbr at google.com>
Reviewed by David Levin.
Remove obsolete WebGLArray type names
https://bugs.webkit.org/show_bug.cgi?id=43885
Deleted aliases to obsolete WebGLArray type names. Updated
affected layout tests, synchronizing them with the versions in the
Khronos repository where appropriate. Ran all layout tests.
* bindings/js/JSDOMWindowCustom.cpp:
* page/DOMWindow.idl:
2010-08-11 Kenneth Russell <kbr at google.com>
Reviewed by David Levin.
Remove obsolete WebGLArray type names
https://bugs.webkit.org/show_bug.cgi?id=43885
Deleted aliases to obsolete WebGLArray type names. Updated
affected layout tests, synchronizing them with the versions in the
Khronos repository where appropriate. Ran all layout tests.
* compositing/webgl/webgl-reflection.html:
* fast/canvas/webgl/array-get-and-set-method-removal.html:
* fast/canvas/webgl/array-get-out-of-bounds.html:
* fast/canvas/webgl/array-set-out-of-bounds-expected.txt:
* fast/canvas/webgl/array-set-out-of-bounds.html:
* fast/canvas/webgl/array-setters-expected.txt:
* fast/canvas/webgl/array-setters.html:
* fast/canvas/webgl/array-unit-tests-expected.txt:
* fast/canvas/webgl/array-unit-tests.html:
* fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html:
* fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html:
* fast/canvas/webgl/null-uniform-location.html:
* fast/canvas/webgl/point-size.html:
* fast/canvas/webgl/resources/webgl-test-utils.js:
(WebGLTestUtils):
(WebGLTestUtils.):
* fast/canvas/webgl/script-tests/texImageTest.js:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view-expected.txt:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-expected.txt:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-expected.txt:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-image.html:
* fast/canvas/webgl/tex-image-with-format-and-type.html:
* fast/canvas/webgl/tex-input-validation.html:
* fast/canvas/webgl/tex-sub-image-2d-expected.txt:
* fast/canvas/webgl/tex-sub-image-2d.html:
* fast/canvas/webgl/texImage2DImageDataTest.html:
* fast/canvas/webgl/viewport-unchanged-upon-resize.html:
* fast/canvas/webgl/webgl-array-invalid-ranges-expected.txt:
* fast/canvas/webgl/webgl-array-invalid-ranges.html:
* fast/dom/Window/script-tests/window-property-descriptors.js:
* fast/dom/Window/window-properties.html:
* fast/dom/script-tests/prototype-inheritance.js:
* fast/js/script-tests/global-constructors.js:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b4552ec..3b2845e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,50 @@
+2010-08-11 Kenneth Russell <kbr at google.com>
+
+ Reviewed by David Levin.
+
+ Remove obsolete WebGLArray type names
+ https://bugs.webkit.org/show_bug.cgi?id=43885
+
+ Deleted aliases to obsolete WebGLArray type names. Updated
+ affected layout tests, synchronizing them with the versions in the
+ Khronos repository where appropriate. Ran all layout tests.
+
+ * compositing/webgl/webgl-reflection.html:
+ * fast/canvas/webgl/array-get-and-set-method-removal.html:
+ * fast/canvas/webgl/array-get-out-of-bounds.html:
+ * fast/canvas/webgl/array-set-out-of-bounds-expected.txt:
+ * fast/canvas/webgl/array-set-out-of-bounds.html:
+ * fast/canvas/webgl/array-setters-expected.txt:
+ * fast/canvas/webgl/array-setters.html:
+ * fast/canvas/webgl/array-unit-tests-expected.txt:
+ * fast/canvas/webgl/array-unit-tests.html:
+ * fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html:
+ * fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html:
+ * fast/canvas/webgl/null-uniform-location.html:
+ * fast/canvas/webgl/point-size.html:
+ * fast/canvas/webgl/resources/webgl-test-utils.js:
+ (WebGLTestUtils):
+ (WebGLTestUtils.):
+ * fast/canvas/webgl/script-tests/texImageTest.js:
+ * fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view-expected.txt:
+ * fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view.html:
+ * fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-expected.txt:
+ * fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data.html:
+ * fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-expected.txt:
+ * fast/canvas/webgl/tex-image-and-sub-image-2d-with-image.html:
+ * fast/canvas/webgl/tex-image-with-format-and-type.html:
+ * fast/canvas/webgl/tex-input-validation.html:
+ * fast/canvas/webgl/tex-sub-image-2d-expected.txt:
+ * fast/canvas/webgl/tex-sub-image-2d.html:
+ * fast/canvas/webgl/texImage2DImageDataTest.html:
+ * fast/canvas/webgl/viewport-unchanged-upon-resize.html:
+ * fast/canvas/webgl/webgl-array-invalid-ranges-expected.txt:
+ * fast/canvas/webgl/webgl-array-invalid-ranges.html:
+ * fast/dom/Window/script-tests/window-property-descriptors.js:
+ * fast/dom/Window/window-properties.html:
+ * fast/dom/script-tests/prototype-inheritance.js:
+ * fast/js/script-tests/global-constructors.js:
+
2010-08-11 Nate Chapin <japhet at chromium.org>
Unreviewed, Chromium expectations tweak.
diff --git a/LayoutTests/compositing/webgl/webgl-reflection.html b/LayoutTests/compositing/webgl/webgl-reflection.html
index 62c3d98..d6ba4dd 100644
--- a/LayoutTests/compositing/webgl/webgl-reflection.html
+++ b/LayoutTests/compositing/webgl/webgl-reflection.html
@@ -37,7 +37,7 @@
var vertices = [ 0.0, 0.8, 0.0,
-0.8, -0.8, 0.0,
0.8, -0.8, 0.0 ];
- gl.bufferData(gl.ARRAY_BUFFER, new WebGLFloatArray(vertices), gl.STATIC_DRAW);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);
gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0); // Load the vertex data
gl.enableVertexAttribArray(0);
diff --git a/LayoutTests/fast/canvas/webgl/array-get-and-set-method-removal.html b/LayoutTests/fast/canvas/webgl/array-get-and-set-method-removal.html
index d2e7e74..80ae714 100644
--- a/LayoutTests/fast/canvas/webgl/array-get-and-set-method-removal.html
+++ b/LayoutTests/fast/canvas/webgl/array-get-and-set-method-removal.html
@@ -38,13 +38,13 @@ function negativeTestGetAndSetMethods(typeName) {
}
}
-negativeTestGetAndSetMethods("WebGLByteArray");
-negativeTestGetAndSetMethods("WebGLUnsignedByteArray");
-negativeTestGetAndSetMethods("WebGLShortArray");
-negativeTestGetAndSetMethods("WebGLUnsignedShortArray");
-negativeTestGetAndSetMethods("WebGLIntArray");
-negativeTestGetAndSetMethods("WebGLUnsignedIntArray");
-negativeTestGetAndSetMethods("WebGLFloatArray");
+negativeTestGetAndSetMethods("Int8Array");
+negativeTestGetAndSetMethods("Uint8Array");
+negativeTestGetAndSetMethods("Int16Array");
+negativeTestGetAndSetMethods("Uint16Array");
+negativeTestGetAndSetMethods("Int32Array");
+negativeTestGetAndSetMethods("Uint32Array");
+negativeTestGetAndSetMethods("Float32Array");
successfullyParsed = true;
diff --git a/LayoutTests/fast/canvas/webgl/array-get-out-of-bounds.html b/LayoutTests/fast/canvas/webgl/array-get-out-of-bounds.html
index 0c757d6..dfed84f 100644
--- a/LayoutTests/fast/canvas/webgl/array-get-out-of-bounds.html
+++ b/LayoutTests/fast/canvas/webgl/array-get-out-of-bounds.html
@@ -25,13 +25,13 @@ function testGetWithOutOfRangeIndices(typeName) {
shouldBeUndefined("webGLArray[0x20000000]");
}
-testGetWithOutOfRangeIndices("WebGLByteArray");
-testGetWithOutOfRangeIndices("WebGLUnsignedByteArray");
-testGetWithOutOfRangeIndices("WebGLShortArray");
-testGetWithOutOfRangeIndices("WebGLUnsignedShortArray");
-testGetWithOutOfRangeIndices("WebGLIntArray");
-testGetWithOutOfRangeIndices("WebGLUnsignedIntArray");
-testGetWithOutOfRangeIndices("WebGLFloatArray");
+testGetWithOutOfRangeIndices("Int8Array");
+testGetWithOutOfRangeIndices("Uint8Array");
+testGetWithOutOfRangeIndices("Int16Array");
+testGetWithOutOfRangeIndices("Uint16Array");
+testGetWithOutOfRangeIndices("Int32Array");
+testGetWithOutOfRangeIndices("Uint32Array");
+testGetWithOutOfRangeIndices("Float32Array");
successfullyParsed = true;
diff --git a/LayoutTests/fast/canvas/webgl/array-set-out-of-bounds-expected.txt b/LayoutTests/fast/canvas/webgl/array-set-out-of-bounds-expected.txt
index 9977c91..38a056d 100644
--- a/LayoutTests/fast/canvas/webgl/array-set-out-of-bounds-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/array-set-out-of-bounds-expected.txt
@@ -3,25 +3,25 @@ Verifies that attempting to set out-of-bounds elements of a WebGLArray from a Ja
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Regression test for https://bugs.webkit.org/show_bug.cgi?id=33352 : Passing array that is too large to set method of WebGLArrays does not throw an exception
-Testing WebGLByteArray
+Testing Int8Array
PASS webGLArray.set([4, 5], 1) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
PASS webGLArray.set([4, 5, 6]) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
-Testing WebGLUnsignedByteArray
+Testing Uint8Array
PASS webGLArray.set([4, 5], 1) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
PASS webGLArray.set([4, 5, 6]) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
-Testing WebGLShortArray
+Testing Int16Array
PASS webGLArray.set([4, 5], 1) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
PASS webGLArray.set([4, 5, 6]) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
-Testing WebGLUnsignedShortArray
+Testing Uint16Array
PASS webGLArray.set([4, 5], 1) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
PASS webGLArray.set([4, 5, 6]) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
-Testing WebGLIntArray
+Testing Int32Array
PASS webGLArray.set([4, 5], 1) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
PASS webGLArray.set([4, 5, 6]) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
-Testing WebGLUnsignedIntArray
+Testing Uint32Array
PASS webGLArray.set([4, 5], 1) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
PASS webGLArray.set([4, 5, 6]) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
-Testing WebGLFloatArray
+Testing Float32Array
PASS webGLArray.set([4, 5], 1) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
PASS webGLArray.set([4, 5, 6]) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
PASS successfullyParsed is true
diff --git a/LayoutTests/fast/canvas/webgl/array-set-out-of-bounds.html b/LayoutTests/fast/canvas/webgl/array-set-out-of-bounds.html
index a501af8..c7bf479 100644
--- a/LayoutTests/fast/canvas/webgl/array-set-out-of-bounds.html
+++ b/LayoutTests/fast/canvas/webgl/array-set-out-of-bounds.html
@@ -25,13 +25,13 @@ function negativeTestSet(typeName) {
shouldThrow("webGLArray.set([4, 5, 6])");
}
-negativeTestSet("WebGLByteArray");
-negativeTestSet("WebGLUnsignedByteArray");
-negativeTestSet("WebGLShortArray");
-negativeTestSet("WebGLUnsignedShortArray");
-negativeTestSet("WebGLIntArray");
-negativeTestSet("WebGLUnsignedIntArray");
-negativeTestSet("WebGLFloatArray");
+negativeTestSet("Int8Array");
+negativeTestSet("Uint8Array");
+negativeTestSet("Int16Array");
+negativeTestSet("Uint16Array");
+negativeTestSet("Int32Array");
+negativeTestSet("Uint32Array");
+negativeTestSet("Float32Array");
successfullyParsed = true;
diff --git a/LayoutTests/fast/canvas/webgl/array-setters-expected.txt b/LayoutTests/fast/canvas/webgl/array-setters-expected.txt
index 5fc6fe4..9aff8de 100644
--- a/LayoutTests/fast/canvas/webgl/array-setters-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/array-setters-expected.txt
@@ -3,7 +3,7 @@ Test all permutations of WebGLArray setters to make sure values don't get trunca
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Regression test for https://bugs.webkit.org/show_bug.cgi?id=33350 : WebGLArray subclasses do the wrong conversion in indexSetter
-Testing WebGLByteArray
+Testing Int8Array
PASS webGLArray is array
PASS webGLArray[0] is array[0]
PASS webGLArray[1] is array[1]
@@ -21,7 +21,7 @@ PASS webGLArray[3] is 99
PASS webGLArray[4] is 77
PASS array[0] is 99
PASS array[1] is 99
-Testing WebGLUnsignedByteArray
+Testing Uint8Array
PASS webGLArray is array
PASS webGLArray[0] is array[0]
PASS webGLArray[1] is array[1]
@@ -39,7 +39,7 @@ PASS webGLArray[3] is 99
PASS webGLArray[4] is 77
PASS array[0] is 99
PASS array[1] is 99
-Testing WebGLShortArray
+Testing Int16Array
PASS webGLArray is array
PASS webGLArray[0] is array[0]
PASS webGLArray[1] is array[1]
@@ -57,7 +57,7 @@ PASS webGLArray[3] is 99
PASS webGLArray[4] is 77
PASS array[0] is 99
PASS array[1] is 99
-Testing WebGLUnsignedShortArray
+Testing Uint16Array
PASS webGLArray is array
PASS webGLArray[0] is array[0]
PASS webGLArray[1] is array[1]
@@ -75,7 +75,7 @@ PASS webGLArray[3] is 99
PASS webGLArray[4] is 77
PASS array[0] is 99
PASS array[1] is 99
-Testing WebGLIntArray
+Testing Int32Array
PASS webGLArray is array
PASS webGLArray[0] is array[0]
PASS webGLArray[1] is array[1]
@@ -93,7 +93,7 @@ PASS webGLArray[3] is 99
PASS webGLArray[4] is 77
PASS array[0] is 99
PASS array[1] is 99
-Testing WebGLUnsignedIntArray
+Testing Uint32Array
PASS webGLArray is array
PASS webGLArray[0] is array[0]
PASS webGLArray[1] is array[1]
@@ -111,7 +111,7 @@ PASS webGLArray[3] is 99
PASS webGLArray[4] is 77
PASS array[0] is 99
PASS array[1] is 99
-Testing WebGLFloatArray
+Testing Float32Array
PASS webGLArray is array
PASS webGLArray[0] is array[0]
PASS webGLArray[1] is array[1]
diff --git a/LayoutTests/fast/canvas/webgl/array-setters.html b/LayoutTests/fast/canvas/webgl/array-setters.html
index 2b12623..3a5fe66 100644
--- a/LayoutTests/fast/canvas/webgl/array-setters.html
+++ b/LayoutTests/fast/canvas/webgl/array-setters.html
@@ -58,13 +58,13 @@ function testSetters(typeName, low, high) {
shouldBe("array[1]", "99");
}
-testSetters("WebGLByteArray", -128, 127);
-testSetters("WebGLUnsignedByteArray", 0, 255);
-testSetters("WebGLShortArray", -32768, 32767);
-testSetters("WebGLUnsignedShortArray", 0, 65535);
-testSetters("WebGLIntArray", -2147483648, 2147483647);
-testSetters("WebGLUnsignedIntArray", 0, 4294967295);
-testSetters("WebGLFloatArray", -2.5, 3.5);
+testSetters("Int8Array", -128, 127);
+testSetters("Uint8Array", 0, 255);
+testSetters("Int16Array", -32768, 32767);
+testSetters("Uint16Array", 0, 65535);
+testSetters("Int32Array", -2147483648, 2147483647);
+testSetters("Uint32Array", 0, 4294967295);
+testSetters("Float32Array", -2.5, 3.5);
successfullyParsed = true;
</script>
diff --git a/LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt b/LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt
index 7b8bda7..5d6fd06 100644
--- a/LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt
@@ -276,280 +276,6 @@ PASS Setting Uint32Array from fake array with invalid length was caught
PASS Setting Uint32Array from Uint32Array with out-of-range offset was caught
PASS array.get is undefined.
PASS array.set(0, 1) threw exception.
-PASS test WebGLByteArray SetAndGetPos10ToNeg10
-PASS test WebGLByteArray ConstructWithArrayOfSignedValues
-PASS test WebGLByteArray ConstructWithTypedArrayOfSignedValues
-Testing WebGLByteArray GetWithOutOfRangeIndices
-PASS array[2] is undefined.
-PASS array[-1] is undefined.
-PASS array[0x20000000] is undefined.
-PASS test WebGLByteArray OffsetsAndSizes
-PASS test WebGLByteArray SetFromTypedArray
-PASS negativeTest WebGLByteArray SetFromTypedArray
-PASS test WebGLByteArray SetFromArray
-PASS negativeTest WebGLByteArray SetFromArray
-PASS test WebGLByteArray Slice
-PASS negativeTest WebGLByteArray Slice
-PASS test WebGLByteArray BoundaryConditions(-128, -128, 127, 127)
-PASS Construction of WebGLByteArray with null buffer threw exception
-PASS Construction of WebGLByteArray with (null buffer, 0) threw exception
-PASS Construction of WebGLByteArray with (null buffer, 0, 0) threw exception
-PASS Construction of WebGLByteArray with out-of-range values threw INDEX_SIZE_ERR exception
-PASS Construction of ArrayBuffer with negative size threw exception
-PASS Construction of WebGLByteArray with negative size threw exception
-PASS Construction of WebGLByteArray with negative out-of-range values threw INDEX_SIZE_ERR exception
-Testing slicing of WebGLByteArray
-PASS array.length is 32 / typeSize
-PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
-PASS array.slice(4, -2147483648).length is 0
-Testing slicing with default inputs of WebGLByteArray
-PASS array.length is 32 / typeSize
-PASS array.slice().length is (32 / typeSize)
-PASS array.slice(2).length is (32 / typeSize) - 2
-PASS array.slice(-2).length is 2
-PASS array.slice(-2147483648).length is (32 / typeSize)
-PASS Setting WebGLByteArray from array with out-of-range offset was caught
-PASS Setting WebGLByteArray from fake array with invalid length was caught
-PASS Setting WebGLByteArray from WebGLByteArray with out-of-range offset was caught
-PASS array.get is undefined.
-PASS array.set(0, 1) threw exception.
-PASS test WebGLFloatArray SetAndGetPos10ToNeg10
-PASS test WebGLFloatArray ConstructWithArrayOfSignedValues
-PASS test WebGLFloatArray ConstructWithTypedArrayOfSignedValues
-Testing WebGLFloatArray GetWithOutOfRangeIndices
-PASS array[2] is undefined.
-PASS array[-1] is undefined.
-PASS array[0x20000000] is undefined.
-PASS test WebGLFloatArray OffsetsAndSizes
-PASS test WebGLFloatArray SetFromTypedArray
-PASS negativeTest WebGLFloatArray SetFromTypedArray
-PASS test WebGLFloatArray SetFromArray
-PASS negativeTest WebGLFloatArray SetFromArray
-PASS test WebGLFloatArray Slice
-PASS negativeTest WebGLFloatArray Slice
-PASS test WebGLFloatArray BoundaryConditions(-500.5, -500.5, 500.5, 500.5)
-PASS Construction of WebGLFloatArray with null buffer threw exception
-PASS Construction of WebGLFloatArray with (null buffer, 0) threw exception
-PASS Construction of WebGLFloatArray with (null buffer, 0, 0) threw exception
-PASS Construction of WebGLFloatArray with out-of-range values threw INDEX_SIZE_ERR exception
-PASS Construction of ArrayBuffer with negative size threw exception
-PASS Construction of WebGLFloatArray with negative size threw exception
-PASS Construction of WebGLFloatArray with negative out-of-range values threw INDEX_SIZE_ERR exception
-PASS Construction of WebGLFloatArray with unaligned offset threw INDEX_SIZE_ERR exception
-PASS Construction of huge WebGLFloatArray threw exception
-Testing slicing of WebGLFloatArray
-PASS array.length is 32 / typeSize
-PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
-PASS array.slice(4, -2147483648).length is 0
-PASS array.length is 0
-Testing slicing with default inputs of WebGLFloatArray
-PASS array.length is 32 / typeSize
-PASS array.slice().length is (32 / typeSize)
-PASS array.slice(2).length is (32 / typeSize) - 2
-PASS array.slice(-2).length is 2
-PASS array.slice(-2147483648).length is (32 / typeSize)
-PASS Setting WebGLFloatArray from array with out-of-range offset was caught
-PASS Setting WebGLFloatArray from fake array with invalid length was caught
-PASS Setting WebGLFloatArray from WebGLFloatArray with out-of-range offset was caught
-PASS array.get is undefined.
-PASS array.set(0, 1) threw exception.
-PASS test WebGLIntArray SetAndGetPos10ToNeg10
-PASS test WebGLIntArray ConstructWithArrayOfSignedValues
-PASS test WebGLIntArray ConstructWithTypedArrayOfSignedValues
-Testing WebGLIntArray GetWithOutOfRangeIndices
-PASS array[2] is undefined.
-PASS array[-1] is undefined.
-PASS array[0x20000000] is undefined.
-PASS test WebGLIntArray OffsetsAndSizes
-PASS test WebGLIntArray SetFromTypedArray
-PASS negativeTest WebGLIntArray SetFromTypedArray
-PASS test WebGLIntArray SetFromArray
-PASS negativeTest WebGLIntArray SetFromArray
-PASS test WebGLIntArray Slice
-PASS negativeTest WebGLIntArray Slice
-PASS test WebGLIntArray BoundaryConditions(-2147483648, -2147483648, 2147483647, 2147483647)
-PASS Construction of WebGLIntArray with null buffer threw exception
-PASS Construction of WebGLIntArray with (null buffer, 0) threw exception
-PASS Construction of WebGLIntArray with (null buffer, 0, 0) threw exception
-PASS Construction of WebGLIntArray with out-of-range values threw INDEX_SIZE_ERR exception
-PASS Construction of ArrayBuffer with negative size threw exception
-PASS Construction of WebGLIntArray with negative size threw exception
-PASS Construction of WebGLIntArray with negative out-of-range values threw INDEX_SIZE_ERR exception
-PASS Construction of WebGLIntArray with unaligned offset threw INDEX_SIZE_ERR exception
-PASS Construction of huge WebGLIntArray threw exception
-Testing slicing of WebGLIntArray
-PASS array.length is 32 / typeSize
-PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
-PASS array.slice(4, -2147483648).length is 0
-PASS array.length is 0
-Testing slicing with default inputs of WebGLIntArray
-PASS array.length is 32 / typeSize
-PASS array.slice().length is (32 / typeSize)
-PASS array.slice(2).length is (32 / typeSize) - 2
-PASS array.slice(-2).length is 2
-PASS array.slice(-2147483648).length is (32 / typeSize)
-PASS Setting WebGLIntArray from array with out-of-range offset was caught
-PASS Setting WebGLIntArray from fake array with invalid length was caught
-PASS Setting WebGLIntArray from WebGLIntArray with out-of-range offset was caught
-PASS array.get is undefined.
-PASS array.set(0, 1) threw exception.
-PASS test WebGLShortArray SetAndGetPos10ToNeg10
-PASS test WebGLShortArray ConstructWithArrayOfSignedValues
-PASS test WebGLShortArray ConstructWithTypedArrayOfSignedValues
-Testing WebGLShortArray GetWithOutOfRangeIndices
-PASS array[2] is undefined.
-PASS array[-1] is undefined.
-PASS array[0x20000000] is undefined.
-PASS test WebGLShortArray OffsetsAndSizes
-PASS test WebGLShortArray SetFromTypedArray
-PASS negativeTest WebGLShortArray SetFromTypedArray
-PASS test WebGLShortArray SetFromArray
-PASS negativeTest WebGLShortArray SetFromArray
-PASS test WebGLShortArray Slice
-PASS negativeTest WebGLShortArray Slice
-PASS test WebGLShortArray BoundaryConditions(-32768, -32768, 32767, 32767)
-PASS Construction of WebGLShortArray with null buffer threw exception
-PASS Construction of WebGLShortArray with (null buffer, 0) threw exception
-PASS Construction of WebGLShortArray with (null buffer, 0, 0) threw exception
-PASS Construction of WebGLShortArray with out-of-range values threw INDEX_SIZE_ERR exception
-PASS Construction of ArrayBuffer with negative size threw exception
-PASS Construction of WebGLShortArray with negative size threw exception
-PASS Construction of WebGLShortArray with negative out-of-range values threw INDEX_SIZE_ERR exception
-PASS Construction of WebGLShortArray with unaligned offset threw INDEX_SIZE_ERR exception
-PASS Construction of huge WebGLShortArray threw exception
-Testing slicing of WebGLShortArray
-PASS array.length is 32 / typeSize
-PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
-PASS array.slice(4, -2147483648).length is 0
-PASS array.length is 0
-Testing slicing with default inputs of WebGLShortArray
-PASS array.length is 32 / typeSize
-PASS array.slice().length is (32 / typeSize)
-PASS array.slice(2).length is (32 / typeSize) - 2
-PASS array.slice(-2).length is 2
-PASS array.slice(-2147483648).length is (32 / typeSize)
-PASS Setting WebGLShortArray from array with out-of-range offset was caught
-PASS Setting WebGLShortArray from fake array with invalid length was caught
-PASS Setting WebGLShortArray from WebGLShortArray with out-of-range offset was caught
-PASS array.get is undefined.
-PASS array.set(0, 1) threw exception.
-PASS test WebGLUnsignedByteArray SetAndGet10To1
-PASS test WebGLUnsignedByteArray ConstructWithArrayOfUnsignedValues
-PASS test WebGLUnsignedByteArray ConstructWithTypedArrayOfUnsignedValues
-Testing WebGLUnsignedByteArray GetWithOutOfRangeIndices
-PASS array[2] is undefined.
-PASS array[-1] is undefined.
-PASS array[0x20000000] is undefined.
-PASS test WebGLUnsignedByteArray OffsetsAndSizes
-PASS test WebGLUnsignedByteArray SetFromTypedArray
-PASS negativeTest WebGLUnsignedByteArray SetFromTypedArray
-PASS test WebGLUnsignedByteArray SetFromArray
-PASS negativeTest WebGLUnsignedByteArray SetFromArray
-PASS test WebGLUnsignedByteArray Slice
-PASS negativeTest WebGLUnsignedByteArray Slice
-PASS test WebGLUnsignedByteArray BoundaryConditions(0, 0, 255, 255)
-PASS Construction of WebGLUnsignedByteArray with null buffer threw exception
-PASS Construction of WebGLUnsignedByteArray with (null buffer, 0) threw exception
-PASS Construction of WebGLUnsignedByteArray with (null buffer, 0, 0) threw exception
-PASS Construction of WebGLUnsignedByteArray with out-of-range values threw INDEX_SIZE_ERR exception
-PASS Construction of ArrayBuffer with negative size threw exception
-PASS Construction of WebGLUnsignedByteArray with negative size threw exception
-PASS Construction of WebGLUnsignedByteArray with negative out-of-range values threw INDEX_SIZE_ERR exception
-Testing slicing of WebGLUnsignedByteArray
-PASS array.length is 32 / typeSize
-PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
-PASS array.slice(4, -2147483648).length is 0
-Testing slicing with default inputs of WebGLUnsignedByteArray
-PASS array.length is 32 / typeSize
-PASS array.slice().length is (32 / typeSize)
-PASS array.slice(2).length is (32 / typeSize) - 2
-PASS array.slice(-2).length is 2
-PASS array.slice(-2147483648).length is (32 / typeSize)
-PASS Setting WebGLUnsignedByteArray from array with out-of-range offset was caught
-PASS Setting WebGLUnsignedByteArray from fake array with invalid length was caught
-PASS Setting WebGLUnsignedByteArray from WebGLUnsignedByteArray with out-of-range offset was caught
-PASS array.get is undefined.
-PASS array.set(0, 1) threw exception.
-PASS test WebGLUnsignedIntArray SetAndGet10To1
-PASS test WebGLUnsignedIntArray ConstructWithArrayOfUnsignedValues
-PASS test WebGLUnsignedIntArray ConstructWithTypedArrayOfUnsignedValues
-Testing WebGLUnsignedIntArray GetWithOutOfRangeIndices
-PASS array[2] is undefined.
-PASS array[-1] is undefined.
-PASS array[0x20000000] is undefined.
-PASS test WebGLUnsignedIntArray OffsetsAndSizes
-PASS test WebGLUnsignedIntArray SetFromTypedArray
-PASS negativeTest WebGLUnsignedIntArray SetFromTypedArray
-PASS test WebGLUnsignedIntArray SetFromArray
-PASS negativeTest WebGLUnsignedIntArray SetFromArray
-PASS test WebGLUnsignedIntArray Slice
-PASS negativeTest WebGLUnsignedIntArray Slice
-PASS test WebGLUnsignedIntArray BoundaryConditions(0, 0, 4294967295, 4294967295)
-PASS Construction of WebGLUnsignedIntArray with null buffer threw exception
-PASS Construction of WebGLUnsignedIntArray with (null buffer, 0) threw exception
-PASS Construction of WebGLUnsignedIntArray with (null buffer, 0, 0) threw exception
-PASS Construction of WebGLUnsignedIntArray with out-of-range values threw INDEX_SIZE_ERR exception
-PASS Construction of ArrayBuffer with negative size threw exception
-PASS Construction of WebGLUnsignedIntArray with negative size threw exception
-PASS Construction of WebGLUnsignedIntArray with negative out-of-range values threw INDEX_SIZE_ERR exception
-PASS Construction of WebGLUnsignedIntArray with unaligned offset threw INDEX_SIZE_ERR exception
-PASS Construction of huge WebGLUnsignedIntArray threw exception
-Testing slicing of WebGLUnsignedIntArray
-PASS array.length is 32 / typeSize
-PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
-PASS array.slice(4, -2147483648).length is 0
-PASS array.length is 0
-Testing slicing with default inputs of WebGLUnsignedIntArray
-PASS array.length is 32 / typeSize
-PASS array.slice().length is (32 / typeSize)
-PASS array.slice(2).length is (32 / typeSize) - 2
-PASS array.slice(-2).length is 2
-PASS array.slice(-2147483648).length is (32 / typeSize)
-PASS Setting WebGLUnsignedIntArray from array with out-of-range offset was caught
-PASS Setting WebGLUnsignedIntArray from fake array with invalid length was caught
-PASS Setting WebGLUnsignedIntArray from WebGLUnsignedIntArray with out-of-range offset was caught
-PASS array.get is undefined.
-PASS array.set(0, 1) threw exception.
-PASS test WebGLUnsignedShortArray SetAndGet10To1
-PASS test WebGLUnsignedShortArray ConstructWithArrayOfUnsignedValues
-PASS test WebGLUnsignedShortArray ConstructWithTypedArrayOfUnsignedValues
-Testing WebGLUnsignedShortArray GetWithOutOfRangeIndices
-PASS array[2] is undefined.
-PASS array[-1] is undefined.
-PASS array[0x20000000] is undefined.
-PASS test WebGLUnsignedShortArray OffsetsAndSizes
-PASS test WebGLUnsignedShortArray SetFromTypedArray
-PASS negativeTest WebGLUnsignedShortArray SetFromTypedArray
-PASS test WebGLUnsignedShortArray SetFromArray
-PASS negativeTest WebGLUnsignedShortArray SetFromArray
-PASS test WebGLUnsignedShortArray Slice
-PASS negativeTest WebGLUnsignedShortArray Slice
-PASS test WebGLUnsignedShortArray BoundaryConditions(0, 0, 65535, 65535)
-PASS Construction of WebGLUnsignedShortArray with null buffer threw exception
-PASS Construction of WebGLUnsignedShortArray with (null buffer, 0) threw exception
-PASS Construction of WebGLUnsignedShortArray with (null buffer, 0, 0) threw exception
-PASS Construction of WebGLUnsignedShortArray with out-of-range values threw INDEX_SIZE_ERR exception
-PASS Construction of ArrayBuffer with negative size threw exception
-PASS Construction of WebGLUnsignedShortArray with negative size threw exception
-PASS Construction of WebGLUnsignedShortArray with negative out-of-range values threw INDEX_SIZE_ERR exception
-PASS Construction of WebGLUnsignedShortArray with unaligned offset threw INDEX_SIZE_ERR exception
-PASS Construction of huge WebGLUnsignedShortArray threw exception
-Testing slicing of WebGLUnsignedShortArray
-PASS array.length is 32 / typeSize
-PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
-PASS array.slice(4, -2147483648).length is 0
-PASS array.length is 0
-Testing slicing with default inputs of WebGLUnsignedShortArray
-PASS array.length is 32 / typeSize
-PASS array.slice().length is (32 / typeSize)
-PASS array.slice(2).length is (32 / typeSize) - 2
-PASS array.slice(-2).length is 2
-PASS array.slice(-2147483648).length is (32 / typeSize)
-PASS Setting WebGLUnsignedShortArray from array with out-of-range offset was caught
-PASS Setting WebGLUnsignedShortArray from fake array with invalid length was caught
-PASS Setting WebGLUnsignedShortArray from WebGLUnsignedShortArray with out-of-range offset was caught
-PASS array.get is undefined.
-PASS array.set(0, 1) threw exception.
Test passed.
PASS successfullyParsed is true
diff --git a/LayoutTests/fast/canvas/webgl/array-unit-tests.html b/LayoutTests/fast/canvas/webgl/array-unit-tests.html
index 784f896..850237d 100644
--- a/LayoutTests/fast/canvas/webgl/array-unit-tests.html
+++ b/LayoutTests/fast/canvas/webgl/array-unit-tests.html
@@ -595,59 +595,7 @@ function runTests() {
low: 0,
expectedLow: 0,
high: 4294967295,
- expectedHigh: 4294967295},
-
- // Legacy names of these types. Left here only to catch breakage
- // until the WebGLArray aliases are removed completely. (FIXME)
- {name: "WebGLByteArray",
- unsigned: false,
- elementSizeInBytes: 1,
- low: -128,
- expectedLow: -128,
- high: 127,
- expectedHigh: 127},
- {name: "WebGLFloatArray",
- unsigned: false,
- elementSizeInBytes: 4,
- low: -500.5,
- expectedLow: -500.5,
- high: 500.5,
- expectedHigh: 500.5},
- {name: "WebGLIntArray",
- unsigned: false,
- elementSizeInBytes: 4,
- low: -2147483648,
- expectedLow: -2147483648,
- high: 2147483647,
- expectedHigh: 2147483647},
- {name: "WebGLShortArray",
- unsigned: false,
- elementSizeInBytes: 2,
- low: -32768,
- expectedLow: -32768,
- high: 32767,
- expectedHigh: 32767},
- {name: "WebGLUnsignedByteArray",
- unsigned: true,
- elementSizeInBytes: 1,
- low: 0,
- expectedLow: 0,
- high: 255,
- expectedHigh: 255},
- {name: "WebGLUnsignedIntArray",
- unsigned: true,
- elementSizeInBytes: 4,
- low: 0,
- expectedLow: 0,
- high: 4294967295,
- expectedHigh: 4294967295},
- {name: "WebGLUnsignedShortArray",
- unsigned: true,
- elementSizeInBytes: 2,
- low: 0,
- expectedLow: 0,
- high: 65535,
- expectedHigh: 65535} ];
+ expectedHigh: 4294967295} ];
for (var i = 0; i < testCases.length; i++) {
var testCase = testCases[i];
diff --git a/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html b/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
index b8edb5b..0c7d040 100644
--- a/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
+++ b/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
@@ -170,14 +170,14 @@ function testDepth(depth)
webGL.depthFunc(webGL.NEVER);
- var vertices = new WebGLFloatArray([
+ var vertices = new Float32Array([
1.0, 1.0, 0.0,
-1.0, 1.0, 0.0,
-1.0, -1.0, 0.0,
1.0, 1.0, 0.0,
-1.0, -1.0, 0.0,
1.0, -1.0, 0.0]);
- var colors = new WebGLUnsignedByteArray([
+ var colors = new Uint8Array([
255, 0, 0, 255,
255, 0, 0, 255,
255, 0, 0, 255,
@@ -213,14 +213,14 @@ function testStencil(stencil)
webGL.stencilFunc(webGL.NEVER, 1, 1);
webGL.stencilOp(webGL.KEEP, webGL.KEEP, webGL.KEEP);
- var vertices = new WebGLFloatArray([
+ var vertices = new Float32Array([
1.0, 1.0, 0.0,
-1.0, 1.0, 0.0,
-1.0, -1.0, 0.0,
1.0, 1.0, 0.0,
-1.0, -1.0, 0.0,
1.0, -1.0, 0.0]);
- var colors = new WebGLUnsignedByteArray([
+ var colors = new Uint8Array([
255, 0, 0, 255,
255, 0, 0, 255,
255, 0, 0, 255,
@@ -254,11 +254,11 @@ function testAntialias(antialias)
shouldBe("contextAttribs.antialias == true || contextAttribs.antialias == false", "true");
shouldBe("contextAttribs.premultipliedAlpha", "true");
- var vertices = new WebGLFloatArray([
+ var vertices = new Float32Array([
1.0, 1.0, 0.0,
-1.0, 1.0, 0.0,
-1.0, -1.0, 0.0]);
- var colors = new WebGLUnsignedByteArray([
+ var colors = new Uint8Array([
255, 0, 0, 255,
255, 0, 0, 255,
255, 0, 0, 255]);
diff --git a/LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html b/LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html
index 14233b1..12d5b68 100644
--- a/LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html
+++ b/LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html
@@ -59,14 +59,14 @@ function runTestIteration(antialias)
var textureLoc = gl.getUniformLocation(gl.program, "tex");
- var vertices = new WebGLFloatArray([
+ var vertices = new Float32Array([
1.0, 1.0, 0.0,
-1.0, 1.0, 0.0,
-1.0, -1.0, 0.0,
1.0, 1.0, 0.0,
-1.0, -1.0, 0.0,
1.0, -1.0, 0.0]);
- var texCoords = new WebGLFloatArray([
+ var texCoords = new Float32Array([
1.0, 1.0,
0.0, 1.0,
0.0, 0.0,
diff --git a/LayoutTests/fast/canvas/webgl/null-uniform-location.html b/LayoutTests/fast/canvas/webgl/null-uniform-location.html
index 0be664f..cfae63e 100644
--- a/LayoutTests/fast/canvas/webgl/null-uniform-location.html
+++ b/LayoutTests/fast/canvas/webgl/null-uniform-location.html
@@ -16,8 +16,8 @@ var program = loadStandardProgram(gl);
shouldBe("gl.getError()", "gl.NO_ERROR");
shouldBeUndefined("gl.useProgram(program)");
-var floatArray = new WebGLFloatArray([1, 2, 3, 4]);
-var intArray = new WebGLIntArray([1, 2, 3, 4]);
+var floatArray = new Float32Array([1, 2, 3, 4]);
+var intArray = new Int32Array([1, 2, 3, 4]);
function callUniformFunction(name) {
var isArrayVariant = (name.charAt(name.length - 1) == 'v');
@@ -35,7 +35,7 @@ function callUniformFunction(name) {
size = size * size;
args.push(false);
}
- var array = (isFloat ? new WebGLFloatArray(size) : new WebGLIntArray(size));
+ var array = (isFloat ? new Float32Array(size) : new Int32Array(size));
for (var i = 0; i < size; i++) {
array[i] = i;
}
diff --git a/LayoutTests/fast/canvas/webgl/point-size.html b/LayoutTests/fast/canvas/webgl/point-size.html
index 8e32286..242d44a 100644
--- a/LayoutTests/fast/canvas/webgl/point-size.html
+++ b/LayoutTests/fast/canvas/webgl/point-size.html
@@ -18,6 +18,9 @@ void main()
</script>
<script id="fshader" type="x-shader/x-fragment">
+#ifdef GL_ES
+precision mediump float;
+#endif
varying vec4 color;
void main()
@@ -40,9 +43,9 @@ function runTest()
// The choice of (0.4, 0.4) ensures that the centers of the surrounding
// pixels are not contained within the point when it is of size 1, but
// that they definitely are when it is of size 2.
- var vertices = new WebGLFloatArray([
+ var vertices = new Float32Array([
0.4, 0.4, 0.0]);
- var colors = new WebGLUnsignedByteArray([
+ var colors = new Uint8Array([
255, 0, 0, 255]);
var colorOffset = vertices.byteLength;
diff --git a/LayoutTests/fast/canvas/webgl/resources/webgl-test-utils.js b/LayoutTests/fast/canvas/webgl/resources/webgl-test-utils.js
index 331af41..455b63b 100644
--- a/LayoutTests/fast/canvas/webgl/resources/webgl-test-utils.js
+++ b/LayoutTests/fast/canvas/webgl/resources/webgl-test-utils.js
@@ -14,6 +14,22 @@ var log = function(msg) {
}
};
+/**
+ * Wrapped logging function.
+ * @param {string} msg The message to log.
+ */
+var error = function(msg) {
+ if (window.console) {
+ if (window.console.error) {
+ window.console.error(msg);
+ }
+ else if (window.console.log) {
+ window.console.log(msg);
+ }
+ }
+};
+
+
var lastError = "";
/**
@@ -25,6 +41,26 @@ var getLastError = function() {
};
/**
+ * Whether a haystack ends with a needle.
+ * @param {string} haystack String to search
+ * @param {string} needle String to search for.
+ * @param {boolean} True if haystack ends with needle.
+ */
+var endsWith = function(haystack, needle) {
+ return haystack.substr(haystack.length - needle.length) === needle;
+};
+
+/**
+ * Whether a haystack starts with a needle.
+ * @param {string} haystack String to search
+ * @param {string} needle String to search for.
+ * @param {boolean} True if haystack starts with needle.
+ */
+var startsWith = function(haystack, needle) {
+ return haystack.substr(0, needle.length) === needle;
+};
+
+/**
* A vertex shader for a single texture.
* @type {string}
*/
@@ -95,7 +131,7 @@ var setupProgram = function(gl, shaders, attribs, opt_locations) {
if (!linked) {
// something went wrong with the link
lastError = gl.getProgramInfoLog (program);
- log("Error in program linking:" + lastError);
+ error("Error in program linking:" + lastError);
gl.deleteProgram(program);
return null;
@@ -130,6 +166,7 @@ var setupSimpleTextureProgram = function(
gl.deleteShader(fs);
gl.deleteShader(vs);
}
+ gl.useProgram(program);
return program;
};
@@ -148,18 +185,26 @@ var setupUnitQuad = function(gl, opt_positionLocation, opt_texcoordLocation) {
var vertexObject = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
- gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(
- [-1,1,0, 1,1,0, -1,-1,0,
- -1,-1,0, 1,1,0, 1,-1,0]), gl.STATIC_DRAW);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ 1.0, 1.0, 0.0,
+ -1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, -1.0, 0.0]), gl.STATIC_DRAW);
gl.enableVertexAttribArray(opt_positionLocation);
gl.vertexAttribPointer(opt_positionLocation, 3, gl.FLOAT, false, 0, 0);
objects.push(vertexObject);
var vertexObject = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
- gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(
- [0,0, 1,0, 0,1,
- 0,1, 1,0, 1,1]), gl.STATIC_DRAW);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ 1.0, 1.0,
+ 0.0, 1.0,
+ 0.0, 0.0,
+ 1.0, 1.0,
+ 0.0, 0.0,
+ 1.0, 0.0]), gl.STATIC_DRAW);
gl.enableVertexAttribArray(opt_texcoordLocation);
gl.vertexAttribPointer(opt_texcoordLocation, 2, gl.FLOAT, false, 0, 0);
objects.push(vertexObject);
@@ -238,40 +283,72 @@ var drawQuad = function(gl, opt_color) {
};
/**
- * Checks that an entire canvas is 1 color.
+ * Checks that a portion of a canvas is 1 color.
* @param {!WebGLContext} gl The WebGLContext to use.
+ * @param {number} x left corner of region to check.
+ * @param {number} y bottom corner of region to check.
+ * @param {number} width width of region to check.
+ * @param {number} height width of region to check.
* @param {!Array.<number>} color The color to fill clear with before drawing. A
* 4 element array where each element is in the range 0 to 255.
* @param {string} msg Message to associate with success. Eg ("should be red").
*/
-var checkCanvas = function(gl, color, msg) {
- var width = gl.canvas.width;
- var height = gl.canvas.height;
+var checkCanvasRect = function(gl, x, y, width, height, color, msg) {
var buf = new Uint8Array(width * height * 4);
- gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ gl.readPixels(x, y, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buf);
for (var i = 0; i < width * height; ++i) {
var offset = i * 4;
- if (buf[offset + 0] != color[0] ||
- buf[offset + 1] != color[1] ||
- buf[offset + 2] != color[2] ||
- buf[offset + 3] != color[3]) {
- testFailed(msg);
- debug('expected: ' +
- color[0] + ', ' +
- color[1] + ', ' +
- color[2] + ', ' +
- color[3] + ' was: ' +
- buf[offset + 0] + ', ' +
- buf[offset + 1] + ', ' +
- buf[offset + 2] + ', ' +
- buf[offset + 3]);
- return;
+ for (var j = 0; j < color.length; ++j) {
+ if (buf[offset + j] != color[j]) {
+ testFailed(msg);
+ var was = buf[offset + 0].toString();
+ for (j = 1; j < color.length; ++j) {
+ was += "," + buf[offset + j];
+ }
+ debug('expected: ' + color + ' was ' + was);
+ return;
+ }
}
}
testPassed(msg);
};
/**
+ * Checks that an entire canvas is 1 color.
+ * @param {!WebGLContext} gl The WebGLContext to use.
+ * @param {!Array.<number>} color The color to fill clear with before drawing. A
+ * 4 element array where each element is in the range 0 to 255.
+ * @param {string} msg Message to associate with success. Eg ("should be red").
+ */
+var checkCanvas = function(gl, color, msg) {
+ checkCanvasRect(gl, 0, 0, gl.canvas.width, gl.canvas.height, color, msg);
+};
+
+/**
+ * Loads a texture, calls callback when finished.
+ * @param {!WebGLContext} gl The WebGLContext to use.
+ * @param {string} url URL of image to load
+ * @param {function(!Image): void} callback Function that gets called after
+ * image has loaded
+ * @return {!WebGLTexture} The created texture.
+ */
+var loadTexture = function(gl, url, callback) {
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ var image = new Image();
+ image.onload = function() {
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
+ callback(image);
+ };
+ image.src = url;
+ return texture;
+};
+
+/**
* Creates a webgl context.
* @param {!Canvas} opt_canvas The canvas tag to get context from. If one is not
* passed in one will be created.
@@ -351,7 +428,7 @@ function create3DContextWithWrapperThatThrowsOnGLError(canvas) {
wrap[i] = context[i];
}
} catch (e) {
- log("createContextWrapperThatThrowsOnGLError: Error accessing " + i);
+ error("createContextWrapperThatThrowsOnGLError: Error accessing " + i);
}
}
wrap.getError = function() {
@@ -418,11 +495,11 @@ var linkProgram = function(gl, program) {
// something went wrong with the link
var error = gl.getProgramInfoLog (program);
+ testFailed("Error in program linking:" + error);
+
gl.deleteProgram(program);
gl.deleteProgram(fragmentShader);
gl.deleteProgram(vertexShader);
-
- testFailed("Error in program linking:" + error);
}
};
@@ -474,6 +551,9 @@ var setupWebGLWithShaders = function(
gl.useProgram(program);
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
+
gl.enable(gl.DEPTH_TEST);
gl.enable(gl.BLEND);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
@@ -491,7 +571,7 @@ var readFile = function(file) {
var xhr = new XMLHttpRequest();
xhr.open("GET", file, false);
xhr.send();
- return xhr.responseText;
+ return xhr.responseText.replace(/\r/g, "");
};
/**
@@ -534,7 +614,7 @@ var loadShader = function(gl, shaderSource, shaderType) {
// Create the shader object
var shader = gl.createShader(shaderType);
if (shader == null) {
- log("*** Error: unable to create shader '"+shaderSource+"'");
+ error("*** Error: unable to create shader '"+shaderSource+"'");
return null;
}
@@ -549,7 +629,7 @@ var loadShader = function(gl, shaderSource, shaderType) {
if (!compiled) {
// Something went wrong during compilation; get the error
lastError = gl.getShaderInfoLog(shader);
- log("*** Error compiling shader '" + shader + "':" + lastError);
+ error("*** Error compiling shader '" + shader + "':" + lastError);
gl.deleteShader(shader);
return null;
}
@@ -651,6 +731,26 @@ var loadProgramFromScript = function loadProgramFromScript(
return program;
};
+/**
+ * Loads shaders from script tags, creates a program, attaches the shaders and
+ * links.
+ * @param {!WebGLContext} gl The WebGLContext to use.
+ * @param {string} vertexShader The vertex shader.
+ * @param {string} fragmentShader The fragment shader.
+ * @return {!WebGLProgram} The created program.
+ */
+var loadProgram = function(gl, vertexShader, fragmentShader) {
+ var program = gl.createProgram();
+ gl.attachShader(
+ program,
+ loadShader(gl, vertexShader, gl.VERTEX_SHADER));
+ gl.attachShader(
+ program,
+ loadShader(gl, fragmentShader, gl.FRAGMENT_SHADER));
+ linkProgram(gl, program);
+ return program;
+};
+
var loadStandardVertexShader = function(gl) {
return loadShaderFromFile(
gl, "resources/vertexShader.vert", gl.VERTEX_SHADER);
@@ -708,13 +808,16 @@ return {
create3DContextWithWrapperThatThrowsOnGLError:
create3DContextWithWrapperThatThrowsOnGLError,
checkCanvas: checkCanvas,
+ checkCanvasRect: checkCanvasRect,
createColoredTexture: createColoredTexture,
drawQuad: drawQuad,
+ endsWith: endsWith,
getLastError: getLastError,
glErrorShouldBe: glErrorShouldBe,
fillTexture: fillTexture,
loadImageAsync: loadImageAsync,
loadImagesAsync: loadImagesAsync,
+ loadProgram: loadProgram,
loadProgramFromFile: loadProgramFromFile,
loadProgramFromScript: loadProgramFromScript,
loadShader: loadShader,
@@ -723,12 +826,17 @@ return {
loadStandardProgram: loadStandardProgram,
loadStandardVertexShader: loadStandardVertexShader,
loadStandardFragmentShader: loadStandardFragmentShader,
+ loadTexture: loadTexture,
+ log: log,
+ error: error,
setupProgram: setupProgram,
setupSimpleTextureFragmentShader: setupSimpleTextureFragmentShader,
setupSimpleTextureProgram: setupSimpleTextureProgram,
setupSimpleTextureVertexShader: setupSimpleTextureVertexShader,
setupTexturedQuad: setupTexturedQuad,
setupUnitQuad: setupUnitQuad,
+ setupWebGLWithShaders: setupWebGLWithShaders,
+ startsWith: startsWith,
shouldGenerateGLError: shouldGenerateGLError,
readFile: readFile,
readFileList: readFileList,
diff --git a/LayoutTests/fast/canvas/webgl/script-tests/texImageTest.js b/LayoutTests/fast/canvas/webgl/script-tests/texImageTest.js
index 8f1fcd8..bb0db9f 100644
--- a/LayoutTests/fast/canvas/webgl/script-tests/texImageTest.js
+++ b/LayoutTests/fast/canvas/webgl/script-tests/texImageTest.js
@@ -6,7 +6,7 @@ var video = document.createElement("video");
var canvas2d = document.createElement("canvas");
var context2d = canvas2d.getContext("2d");
var imageData = context2d.createImageData(64, 64);
-var array = new WebGLUnsignedByteArray([ 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255 ]);
+var array = new Uint8Array([ 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 255 ]);
shouldThrow("context.texImage2D(context.TEXTURE_2D)");
shouldBeUndefined("context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, 64, 64, 0, context.RGBA, context.UNSIGNED_BYTE, null)");
diff --git a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view-expected.txt b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view-expected.txt
index b7d5028..15d4654 100644
--- a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view-expected.txt
@@ -5,484 +5,484 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=1, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=1, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=1, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=1, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=1, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=1, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=1, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=1, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=2, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=2, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=2, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=2, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=2, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=2, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=2, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=2, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=4, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=4, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=4, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=4, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=4, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=4, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=4, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=4, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=8, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=8, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=8, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_BYTE, unpackAlignment=8, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=8, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=8, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=8, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_BYTE, unpackAlignment=8, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=1, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=1, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=1, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=1, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=1, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=1, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=1, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=1, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=2, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=2, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=2, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=2, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=2, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=2, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=2, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=2, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=4, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=4, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=4, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=4, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=4, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=4, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=4, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=4, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=8, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=8, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=8, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=8, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=8, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=8, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=8, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_5_5_5_1, unpackAlignment=8, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=1, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=1, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=1, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=1, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=1, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=1, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=1, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=1, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=2, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=2, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=2, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=2, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=2, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=2, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=2, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=2, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=4, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=4, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=4, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=4, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=4, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=4, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=4, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=4, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=8, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=8, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=8, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=8, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=8, flipY=true, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=8, flipY=false, premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=8, flipY=true, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with type=UNSIGNED_SHORT_4_4_4_4, unpackAlignment=8, flipY=false, premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view.html b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view.html
index d98d556..13603e8 100644
--- a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view.html
+++ b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view.html
@@ -3,30 +3,9 @@
<link rel="stylesheet" href="../../js/resources/js-test-style.css"/>
<script src="../../js/resources/js-test-pre.js"></script>
<script src="resources/webgl-test.js"></script>
-<script id="vshader" type="x-shader/x-vertex">
-attribute vec3 g_Position;
-attribute vec2 g_TexCoord0;
-
-varying vec2 texCoord;
-
-void main()
-{
- gl_Position = vec4(g_Position.x, g_Position.y, g_Position.z, 1.0);
- texCoord = g_TexCoord0;
-}
-</script>
-
-<script id="fshader" type="x-shader/x-fragment">
-uniform sampler2D tex;
-varying vec2 texCoord;
-
-void main()
-{
- gl_FragColor = texture2D(tex, texCoord);
-}
-</script>
-
+<script src="resources/webgl-test-utils.js"></script>
<script>
+var wtu = WebGLTestUtils;
var gl = null;
var textureLoc = null;
var successfullyParsed = false;
@@ -53,40 +32,15 @@ function init()
data[6] = 0;
data[7] = 0;
- gl = initWebGL("example", "vshader", "fshader", [ "g_Position", "g_TexCoord0" ], [ 0, 0, 0, 1 ], 1);
- gl.viewport(0, 0, 1, 2);
+ var canvas = document.getElementById("example");
+ gl = wtu.create3DContext(canvas);
+ var program = wtu.setupTexturedQuad(gl);
gl.disable(gl.BLEND);
- textureLoc = gl.getUniformLocation(gl.program, "tex");
-
- var vertices = new WebGLFloatArray([
- 1.0, 1.0, 0.0,
- -1.0, 1.0, 0.0,
- -1.0, -1.0, 0.0,
- 1.0, 1.0, 0.0,
- -1.0, -1.0, 0.0,
- 1.0, -1.0, 0.0]);
- var texCoords = new WebGLFloatArray([
- 1.0, 1.0,
- 0.0, 1.0,
- 0.0, 0.0,
- 1.0, 1.0,
- 0.0, 0.0,
- 1.0, 0.0]);
- var texCoordOffset = vertices.byteLength;
-
- var vbo = gl.createBuffer();
- gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
- gl.bufferData(gl.ARRAY_BUFFER,
- texCoordOffset + texCoords.byteLength,
- gl.STATIC_DRAW);
- gl.bufferSubData(gl.ARRAY_BUFFER, 0, vertices);
- gl.bufferSubData(gl.ARRAY_BUFFER, texCoordOffset, texCoords);
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
- gl.enableVertexAttribArray(0);
- gl.vertexAttribPointer(0, 3, gl.FLOAT, gl.FALSE, 0, 0);
- gl.enableVertexAttribArray(1);
- gl.vertexAttribPointer(1, 2, gl.FLOAT, gl.FALSE, 0, texCoordOffset);
+ textureLoc = gl.getUniformLocation(program, "tex");
runTest();
}
@@ -194,7 +148,7 @@ function runOneIteration(useTexSubImage2D, type, unpackAlignment, flipY, premult
// Point the uniform sampler to texture unit 0
gl.uniform1i(textureLoc, 0);
// Draw the triangles
- gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.drawQuad(gl, [0, 0, 0, 255]);
// Read back the rendering results
buf = new Uint8Array(1 * 2 * 4);
@@ -202,21 +156,9 @@ function runOneIteration(useTexSubImage2D, type, unpackAlignment, flipY, premult
// Check the top pixel and bottom pixel and make sure they have
// the right color.
debug("Checking bottom pixel");
- correctColor = bottomColor;
- idx = 0;
- pixel[0] = buf[idx];
- pixel[1] = buf[idx + 1];
- pixel[2] = buf[idx + 2];
- pixel[3] = buf[idx + 3];
- shouldBe("pixel", "correctColor");
+ wtu.checkCanvasRect(gl, 0, 0, 1, 1, bottomColor, "shouldBe " + bottomColor);
debug("Checking top pixel");
- correctColor = topColor;
- idx = 4;
- pixel[0] = buf[idx];
- pixel[1] = buf[idx + 1];
- pixel[2] = buf[idx + 2];
- pixel[3] = buf[idx + 3];
- shouldBe("pixel", "correctColor");
+ wtu.checkCanvasRect(gl, 0, 1, 1, 1, topColor, "shouldBe " + topColor);
}
function runTest()
diff --git a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-expected.txt b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-expected.txt
index 82d311c..f9b7df8 100644
--- a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-expected.txt
@@ -5,44 +5,44 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
Testing texImage2D with flipY=true and premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with flipY=false and premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texImage2D with flipY=true and premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texImage2D with flipY=false and premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Testing texSubImage2D with flipY=true and premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with flipY=false and premultiplyAlpha=false
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,255,0,255
Testing texSubImage2D with flipY=true and premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Testing texSubImage2D with flipY=false and premultiplyAlpha=true
Checking bottom pixel
-PASS pixel is correctColor
+PASS shouldBe 255,0,0,255
Checking top pixel
-PASS pixel is correctColor
+PASS shouldBe 0,0,0,255
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data.html b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data.html
index 650beb4..ab25a15 100644
--- a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data.html
+++ b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data.html
@@ -3,30 +3,9 @@
<link rel="stylesheet" href="../../js/resources/js-test-style.css"/>
<script src="../../js/resources/js-test-pre.js"></script>
<script src="resources/webgl-test.js"></script>
-<script id="vshader" type="x-shader/x-vertex">
-attribute vec3 g_Position;
-attribute vec2 g_TexCoord0;
-
-varying vec2 texCoord;
-
-void main()
-{
- gl_Position = vec4(g_Position.x, g_Position.y, g_Position.z, 1.0);
- texCoord = g_TexCoord0;
-}
-</script>
-
-<script id="fshader" type="x-shader/x-fragment">
-uniform sampler2D tex;
-varying vec2 texCoord;
-
-void main()
-{
- gl_FragColor = texture2D(tex, texCoord);
-}
-</script>
-
+<script src="resources/webgl-test-utils.js"></script>
<script>
+var wtu = WebGLTestUtils;
var gl = null;
var textureLoc = null;
var successfullyParsed = false;
@@ -53,40 +32,15 @@ function init()
data[6] = 0;
data[7] = 0;
- gl = initWebGL("example", "vshader", "fshader", [ "g_Position", "g_TexCoord0" ], [ 0, 0, 0, 1 ], 1);
- gl.viewport(0, 0, 1, 2);
+ wtu = WebGLTestUtils;
+ var canvas = document.getElementById("example");
+ gl = wtu.create3DContext(canvas);
+ var program = wtu.setupTexturedQuad(gl);
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
gl.disable(gl.BLEND);
- textureLoc = gl.getUniformLocation(gl.program, "tex");
-
- var vertices = new WebGLFloatArray([
- 1.0, 1.0, 0.0,
- -1.0, 1.0, 0.0,
- -1.0, -1.0, 0.0,
- 1.0, 1.0, 0.0,
- -1.0, -1.0, 0.0,
- 1.0, -1.0, 0.0]);
- var texCoords = new WebGLFloatArray([
- 1.0, 1.0,
- 0.0, 1.0,
- 0.0, 0.0,
- 1.0, 1.0,
- 0.0, 0.0,
- 1.0, 0.0]);
- var texCoordOffset = vertices.byteLength;
-
- var vbo = gl.createBuffer();
- gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
- gl.bufferData(gl.ARRAY_BUFFER,
- texCoordOffset + texCoords.byteLength,
- gl.STATIC_DRAW);
- gl.bufferSubData(gl.ARRAY_BUFFER, 0, vertices);
- gl.bufferSubData(gl.ARRAY_BUFFER, texCoordOffset, texCoords);
-
- gl.enableVertexAttribArray(0);
- gl.vertexAttribPointer(0, 3, gl.FLOAT, gl.FALSE, 0, 0);
- gl.enableVertexAttribArray(1);
- gl.vertexAttribPointer(1, 2, gl.FLOAT, gl.FALSE, 0, texCoordOffset);
+ textureLoc = gl.getUniformLocation(program, "tex");
runTest();
}
@@ -126,7 +80,7 @@ function runOneIteration(useTexSubImage2D, flipY, premultiplyAlpha, topColor, bo
// Point the uniform sampler to texture unit 0
gl.uniform1i(textureLoc, 0);
// Draw the triangles
- gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.drawQuad(gl, [0, 0, 0, 255]);
// Read back the rendering results
buf = new Uint8Array(1 * 2 * 4);
@@ -134,21 +88,9 @@ function runOneIteration(useTexSubImage2D, flipY, premultiplyAlpha, topColor, bo
// Check the top pixel and bottom pixel and make sure they have
// the right color.
debug("Checking bottom pixel");
- correctColor = bottomColor;
- idx = 0;
- pixel[0] = buf[idx];
- pixel[1] = buf[idx + 1];
- pixel[2] = buf[idx + 2];
- pixel[3] = buf[idx + 3];
- shouldBe("pixel", "correctColor");
+ wtu.checkCanvasRect(gl, 0, 0, 1, 1, bottomColor, "shouldBe " + bottomColor);
debug("Checking top pixel");
- correctColor = topColor;
- idx = 4;
- pixel[0] = buf[idx];
- pixel[1] = buf[idx + 1];
- pixel[2] = buf[idx + 2];
- pixel[3] = buf[idx + 3];
- shouldBe("pixel", "correctColor");
+ wtu.checkCanvasRect(gl, 0, 1, 1, 1, topColor, "shouldBe " + topColor);
}
function runTest()
diff --git a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-expected.txt b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-expected.txt
index 17831c5..3618919 100644
--- a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-expected.txt
@@ -4,48 +4,24 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
Testing texImage2D with flipY=true
Checking lower left corner
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
+PASS shouldBe 0,255,0
Checking upper left corner
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
+PASS shouldBe 255,0,0
Testing texImage2D with flipY=false
Checking lower left corner
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
+PASS shouldBe 255,0,0
Checking upper left corner
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
+PASS shouldBe 0,255,0
Testing texSubImage2D with flipY=true
Checking lower left corner
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
+PASS shouldBe 0,255,0
Checking upper left corner
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
+PASS shouldBe 255,0,0
Testing texSubImage2D with flipY=false
Checking lower left corner
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
+PASS shouldBe 255,0,0
Checking upper left corner
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
-PASS pixel is correctColor
+PASS shouldBe 0,255,0
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image.html b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image.html
index 21ca596..2fbee65 100644
--- a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image.html
+++ b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image.html
@@ -3,30 +3,9 @@
<link rel="stylesheet" href="../../js/resources/js-test-style.css"/>
<script src="../../js/resources/js-test-pre.js"></script>
<script src="resources/webgl-test.js"></script>
-<script id="vshader" type="x-shader/x-vertex">
-attribute vec3 g_Position;
-attribute vec2 g_TexCoord0;
-
-varying vec2 texCoord;
-
-void main()
-{
- gl_Position = vec4(g_Position.x, g_Position.y, g_Position.z, 1.0);
- texCoord = g_TexCoord0;
-}
-</script>
-
-<script id="fshader" type="x-shader/x-fragment">
-uniform sampler2D tex;
-varying vec2 texCoord;
-
-void main()
-{
- gl_FragColor = texture2D(tex, texCoord);
-}
-</script>
-
+<script src="resources/webgl-test-utils.js"></script>
<script>
+var wtu = WebGLTestUtils;
var gl = null;
var textureLoc = null;
var successfullyParsed = false;
@@ -39,56 +18,16 @@ function init()
description('Verify texImage2D and texSubImage2D code paths taking Images');
- gl = initWebGL("example", "vshader", "fshader", [ "g_Position", "g_TexCoord0" ], [ 0, 0, 0, 1 ], 1);
-
- textureLoc = gl.getUniformLocation(gl.program, "tex");
-
- var vertices = new WebGLFloatArray([
- 1.0, 1.0, 0.0,
- -1.0, 1.0, 0.0,
- -1.0, -1.0, 0.0,
- 1.0, 1.0, 0.0,
- -1.0, -1.0, 0.0,
- 1.0, -1.0, 0.0]);
- var texCoords = new WebGLFloatArray([
- 1.0, 1.0,
- 0.0, 1.0,
- 0.0, 0.0,
- 1.0, 1.0,
- 0.0, 0.0,
- 1.0, 0.0]);
- var texCoordOffset = vertices.byteLength;
+ var canvas = document.getElementById("example");
+ gl = wtu.create3DContext(canvas);
+ var program = wtu.setupTexturedQuad(gl);
- var vbo = gl.createBuffer();
- gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
- gl.bufferData(gl.ARRAY_BUFFER,
- texCoordOffset + texCoords.byteLength,
- gl.STATIC_DRAW);
- gl.bufferSubData(gl.ARRAY_BUFFER, 0, vertices);
- gl.bufferSubData(gl.ARRAY_BUFFER, texCoordOffset, texCoords);
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
- gl.enableVertexAttribArray(0);
- gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
- gl.enableVertexAttribArray(1);
- gl.vertexAttribPointer(1, 2, gl.FLOAT, gl.FALSE, 0, texCoordOffset);
+ textureLoc = gl.getUniformLocation(gl.program, "tex");
- loadTexture("resources/red-green.png");
-}
-
-function loadTexture(src) {
- var texture = gl.createTexture();
- gl.bindTexture(gl.TEXTURE_2D, texture);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
- var image = new Image();
- image.onload = function() {
- gl.bindTexture(gl.TEXTURE_2D, texture);
- gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
- runTest(image);
- };
- image.src = src;
- return texture;
+ wtu.loadTexture(gl, "resources/red-green.png", runTest);
}
// These two declarations need to be global for "shouldBe" to see them
@@ -126,43 +65,15 @@ function runOneIteration(image, useTexSubImage2D, flipY, topColor, bottomColor)
// Point the uniform sampler to texture unit 0
gl.uniform1i(textureLoc, 0);
// Draw the triangles
- gl.drawArrays(gl.TRIANGLES, 0, 6);
- // Read back the rendering results
- var width = 32;
- var height = 32;
- buf = new Uint8Array(width * height * 4);
- gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ wtu.drawQuad(gl, [0, 0, 0, 255]);
// Check a few pixels near the top and bottom and make sure they have
// the right color.
- var queryWidth = 2;
- var queryHeight = 2;
debug("Checking lower left corner");
- var xoff = 4;
- var yoff = 4;
- correctColor = bottomColor;
- for (var y = 0; y < queryHeight; y++) {
- for (var x = 0; x < queryWidth; x++) {
- idx = ((yoff + y) * width * 4 +
- (xoff + x) * 4);
- pixel[0] = buf[idx];
- pixel[1] = buf[idx + 1];
- pixel[2] = buf[idx + 2];
- shouldBe("pixel", "correctColor");
- }
- }
+ wtu.checkCanvasRect(gl, 4, 4, 2, 2, bottomColor,
+ "shouldBe " + bottomColor);
debug("Checking upper left corner");
- yoff = height - 8;
- correctColor = topColor;
- for (var y = 0; y < queryHeight; y++) {
- for (var x = 0; x < queryWidth; x++) {
- idx = ((yoff + y) * width * 4 +
- (xoff + x) * 4);
- pixel[0] = buf[idx];
- pixel[1] = buf[idx + 1];
- pixel[2] = buf[idx + 2];
- shouldBe("pixel", "correctColor");
- }
- }
+ wtu.checkCanvasRect(gl, 4, gl.canvas.height - 8, 2, 2, topColor,
+ "shouldBe " + topColor);
}
function runTest(image)
@@ -194,3 +105,5 @@ function finish() {
<div id="console"></div>
</body>
</html>
+
+
diff --git a/LayoutTests/fast/canvas/webgl/tex-image-with-format-and-type.html b/LayoutTests/fast/canvas/webgl/tex-image-with-format-and-type.html
index 7467c10..ebad95b 100644
--- a/LayoutTests/fast/canvas/webgl/tex-image-with-format-and-type.html
+++ b/LayoutTests/fast/canvas/webgl/tex-image-with-format-and-type.html
@@ -4,30 +4,10 @@
<script src="../../js/resources/js-test-pre.js"></script>
<script src="resources/pnglib.js"></script>
<script src="resources/webgl-test.js"></script>
-<script id="vshader" type="x-shader/x-vertex">
-attribute vec3 g_Position;
-attribute vec2 g_TexCoord0;
-
-varying vec2 texCoord;
-
-void main()
-{
- gl_Position = vec4(g_Position.x, g_Position.y, g_Position.z, 1.0);
- texCoord = g_TexCoord0;
-}
-</script>
-
-<script id="fshader" type="x-shader/x-fragment">
-uniform sampler2D tex;
-varying vec2 texCoord;
-
-void main()
-{
- gl_FragColor = texture2D(tex, texCoord);
-}
-</script>
+<script src="resources/webgl-test-utils.js"></script>
<script>
+var wtu = WebGLTestUtils;
var gl = null;
var textureLoc = null;
var successfullyParsed = false;
@@ -57,39 +37,15 @@ function init()
description('Verify texImage2D and texSubImage2D code paths taking both HTML and user-specified data with all format/type combinations');
- gl = initWebGL("example", "vshader", "fshader", [ "g_Position", "g_TexCoord0" ], [ 0, 0, 0, 1 ], 1);
+ var canvas = document.getElementById("example");
+ gl = wtu.create3DContext(canvas);
+ var program = wtu.setupTexturedQuad(gl);
+
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
gl.disable(gl.BLEND);
- textureLoc = gl.getUniformLocation(gl.program, "tex");
-
- var vertices = new WebGLFloatArray([
- 1.0, 1.0, 0.0,
- -1.0, 1.0, 0.0,
- -1.0, -1.0, 0.0,
- 1.0, 1.0, 0.0,
- -1.0, -1.0, 0.0,
- 1.0, -1.0, 0.0]);
- var texCoords = new WebGLFloatArray([
- 1.0, 1.0,
- 0.0, 1.0,
- 0.0, 0.0,
- 1.0, 1.0,
- 0.0, 0.0,
- 1.0, 0.0]);
- var texCoordOffset = vertices.byteLength;
-
- var vbo = gl.createBuffer();
- gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
- gl.bufferData(gl.ARRAY_BUFFER,
- texCoordOffset + texCoords.byteLength,
- gl.STATIC_DRAW);
- gl.bufferSubData(gl.ARRAY_BUFFER, 0, vertices);
- gl.bufferSubData(gl.ARRAY_BUFFER, texCoordOffset, texCoords);
-
- gl.enableVertexAttribArray(0);
- gl.vertexAttribPointer(0, 3, gl.FLOAT, gl.FALSE, 0, 0);
- gl.enableVertexAttribArray(1);
- gl.vertexAttribPointer(1, 2, gl.FLOAT, gl.FALSE, 0, texCoordOffset);
+ textureLoc = gl.getUniformLocation(program, "tex");
initializeTests();
}
diff --git a/LayoutTests/fast/canvas/webgl/tex-input-validation.html b/LayoutTests/fast/canvas/webgl/tex-input-validation.html
index 2c0a7fa..1f1c168 100644
--- a/LayoutTests/fast/canvas/webgl/tex-input-validation.html
+++ b/LayoutTests/fast/canvas/webgl/tex-input-validation.html
@@ -31,7 +31,7 @@ function testTexSubImage2D(testCase)
var yoffset = 0;
var width = 16;
var height = 16;
- var array = new WebGLUnsignedByteArray(width * height * 4);
+ var array = new Uint8Array(width * height * 4);
gl.texSubImage2D(testCase.target, level, xoffset, yoffset, width, height, testCase.format, testCase.type, array);
error = testCase.expectedError;
shouldBe("gl.getError()", "error");
diff --git a/LayoutTests/fast/canvas/webgl/tex-sub-image-2d-expected.txt b/LayoutTests/fast/canvas/webgl/tex-sub-image-2d-expected.txt
index c20dda1..120c691 100644
--- a/LayoutTests/fast/canvas/webgl/tex-sub-image-2d-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/tex-sub-image-2d-expected.txt
@@ -1,4 +1,4 @@
-Tests texSubImage2D upload path from WebGLUnsignedByteArray
+Tests texSubImage2D upload path from Uint8Array
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
diff --git a/LayoutTests/fast/canvas/webgl/tex-sub-image-2d.html b/LayoutTests/fast/canvas/webgl/tex-sub-image-2d.html
index d877a5c..ac4aab3 100644
--- a/LayoutTests/fast/canvas/webgl/tex-sub-image-2d.html
+++ b/LayoutTests/fast/canvas/webgl/tex-sub-image-2d.html
@@ -3,20 +3,11 @@
<link rel="stylesheet" href="../../js/resources/js-test-style.css"/>
<script src="../../js/resources/js-test-pre.js"></script>
<script src="resources/webgl-test.js"></script>
-<script id="vshader" type="x-shader/x-vertex">
-attribute vec3 g_Position;
-attribute vec2 g_TexCoord0;
-
-varying vec2 texCoord;
-
-void main()
-{
- gl_Position = vec4(g_Position.x, g_Position.y, g_Position.z, 1.0);
- texCoord = g_TexCoord0;
-}
-</script>
-
+<script src="resources/webgl-test-utils.js"></script>
<script id="fshader" type="x-shader/x-fragment">
+#ifdef GL_ES
+precision highp float;
+#endif
uniform sampler2D tex;
varying vec2 texCoord;
@@ -33,42 +24,21 @@ void main()
<div id="description"></div>
<div id="console"></div>
<script>
-description('Tests texSubImage2D upload path from WebGLUnsignedByteArray');
-
-var gl = initWebGL("example", "vshader", "fshader", [ "g_Position", "g_TexCoord0" ], [ 0, 0, 0, 1 ], 1);
+description('Tests texSubImage2D upload path from Uint8Array');
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("example");
+var gl = wtu.create3DContext(canvas);
+var program = wtu.setupProgram(
+ gl,
+ [wtu.setupSimpleTextureVertexShader(gl),
+ wtu.loadShaderFromScript(gl, "fshader")],
+ ['vPosition', 'texCoord0']);
+wtu.setupUnitQuad(gl);
var textureWidth = 256;
var textureHeight = 1;
-textureLoc = gl.getUniformLocation(gl.program, "tex");
-
-var vertices = new WebGLFloatArray([
- 1.0, 1.0, 0.0,
- -1.0, 1.0, 0.0,
- -1.0, -1.0, 0.0,
- 1.0, 1.0, 0.0,
- -1.0, -1.0, 0.0,
- 1.0, -1.0, 0.0]);
-var texCoords = new WebGLFloatArray([
- 1.0, 1.0,
- 0.0, 1.0,
- 0.0, 0.0,
- 1.0, 1.0,
- 0.0, 0.0,
- 1.0, 0.0]);
-var texCoordOffset = vertices.byteLength;
-
-var vbo = gl.createBuffer();
-gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
-gl.bufferData(gl.ARRAY_BUFFER,
- texCoordOffset + texCoords.byteLength,
- gl.STATIC_DRAW);
-gl.bufferSubData(gl.ARRAY_BUFFER, 0, vertices);
-gl.bufferSubData(gl.ARRAY_BUFFER, texCoordOffset, texCoords);
-
-gl.enableVertexAttribArray(0);
-gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
-gl.enableVertexAttribArray(1);
-gl.vertexAttribPointer(1, 2, gl.FLOAT, gl.FALSE, 0, texCoordOffset);
+textureLoc = gl.getUniformLocation(program, "tex");
var texture = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, texture);
@@ -79,7 +49,7 @@ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
// Allocate the texture object
gl.texImage2D(gl.TEXTURE_2D, 0, gl.ALPHA, textureWidth, textureHeight, 0, gl.ALPHA, gl.UNSIGNED_BYTE, null);
// Prepare the image data
-var array = new WebGLUnsignedByteArray(textureWidth);
+var array = new Uint8Array(textureWidth);
for (var i = 0; i < textureWidth; i++)
array[i] = i;
// Fill the texture object with data -- this is actually the code path being tested
@@ -88,7 +58,7 @@ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, textureWidth, textureHeight, gl.ALPHA,
// Clear and set up
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
gl.bindTexture(gl.TEXTURE_2D, texture);
-gl.useProgram(gl.program);
+gl.useProgram(program);
gl.uniform1i(textureLoc, 0);
// Draw the texture to the frame buffer
gl.drawArrays(gl.TRIANGLES, 0, 6);
diff --git a/LayoutTests/fast/canvas/webgl/texImage2DImageDataTest.html b/LayoutTests/fast/canvas/webgl/texImage2DImageDataTest.html
index 8dbde4b..e8e9f08 100644
--- a/LayoutTests/fast/canvas/webgl/texImage2DImageDataTest.html
+++ b/LayoutTests/fast/canvas/webgl/texImage2DImageDataTest.html
@@ -63,14 +63,14 @@
var vertexObject = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
- var vertices = new WebGLFloatArray([
+ var vertices = new Float32Array([
-1, 1, 0,
-1, -1, 0,
1, 1, 0,
1, -1, 0,
1, 1, 0,
-1, -1, 0]);
- var texCoords = new WebGLFloatArray([
+ var texCoords = new Float32Array([
0, 1,
0, 0,
1, 1,
diff --git a/LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize.html b/LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize.html
index 6c096d6..dc50f92 100644
--- a/LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize.html
+++ b/LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize.html
@@ -29,7 +29,7 @@ description('Verifies that GL viewport does not change when canvas is resized');
var gl = initWebGL("example", "vshader", "fshader", [ "g_Position" ], [ 0, 0, 1, 1 ], 1);
-var vertices = new WebGLFloatArray([
+var vertices = new Float32Array([
1.0, 1.0, 0.0,
-1.0, 1.0, 0.0,
-1.0, -1.0, 0.0,
diff --git a/LayoutTests/fast/canvas/webgl/webgl-array-invalid-ranges-expected.txt b/LayoutTests/fast/canvas/webgl/webgl-array-invalid-ranges-expected.txt
index 022d06a..9fa121e 100644
--- a/LayoutTests/fast/canvas/webgl/webgl-array-invalid-ranges-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/webgl-array-invalid-ranges-expected.txt
@@ -2,81 +2,81 @@ Verifies that out-of-range parameters for creation, slicing and setting of WebGL
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS Construction of WebGLByteArray with null buffer threw exception
-PASS Construction of WebGLByteArray with out-of-range values threw exception
-PASS Construction of WebGLByteArray with negative out-of-range values threw exception
-Testing slicing of WebGLByteArray
+PASS Construction of Int8Array with null buffer threw exception
+PASS Construction of Int8Array with out-of-range values threw exception
+PASS Construction of Int8Array with negative out-of-range values threw exception
+Testing slicing of Int8Array
PASS array.length is 32 / typeSize
PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
PASS array.slice(4, -2147483648).length is 0
-PASS Setting WebGLByteArray from array with out-of-range offset was caught
-PASS Setting WebGLByteArray from fake array with invalid length was caught
-PASS Setting WebGLByteArray from WebGLByteArray with out-of-range offset was caught
-PASS Construction of WebGLUnsignedByteArray with null buffer threw exception
-PASS Construction of WebGLUnsignedByteArray with out-of-range values threw exception
-PASS Construction of WebGLUnsignedByteArray with negative out-of-range values threw exception
-Testing slicing of WebGLUnsignedByteArray
+PASS Setting Int8Array from array with out-of-range offset was caught
+PASS Setting Int8Array from fake array with invalid length was caught
+PASS Setting Int8Array from Int8Array with out-of-range offset was caught
+PASS Construction of Uint8Array with null buffer threw exception
+PASS Construction of Uint8Array with out-of-range values threw exception
+PASS Construction of Uint8Array with negative out-of-range values threw exception
+Testing slicing of Uint8Array
PASS array.length is 32 / typeSize
PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
PASS array.slice(4, -2147483648).length is 0
-PASS Setting WebGLUnsignedByteArray from array with out-of-range offset was caught
-PASS Setting WebGLUnsignedByteArray from fake array with invalid length was caught
-PASS Setting WebGLUnsignedByteArray from WebGLUnsignedByteArray with out-of-range offset was caught
-PASS Construction of WebGLShortArray with null buffer threw exception
-PASS Construction of WebGLShortArray with out-of-range values threw exception
-PASS Construction of WebGLShortArray with negative out-of-range values threw exception
-PASS Construction of huge WebGLShortArray threw exception
-Testing slicing of WebGLShortArray
+PASS Setting Uint8Array from array with out-of-range offset was caught
+PASS Setting Uint8Array from fake array with invalid length was caught
+PASS Setting Uint8Array from Uint8Array with out-of-range offset was caught
+PASS Construction of Int16Array with null buffer threw exception
+PASS Construction of Int16Array with out-of-range values threw exception
+PASS Construction of Int16Array with negative out-of-range values threw exception
+PASS Construction of huge Int16Array threw exception
+Testing slicing of Int16Array
PASS array.length is 32 / typeSize
PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
PASS array.slice(4, -2147483648).length is 0
-PASS Setting WebGLShortArray from array with out-of-range offset was caught
-PASS Setting WebGLShortArray from fake array with invalid length was caught
-PASS Setting WebGLShortArray from WebGLShortArray with out-of-range offset was caught
-PASS Construction of WebGLUnsignedShortArray with null buffer threw exception
-PASS Construction of WebGLUnsignedShortArray with out-of-range values threw exception
-PASS Construction of WebGLUnsignedShortArray with negative out-of-range values threw exception
-PASS Construction of huge WebGLUnsignedShortArray threw exception
-Testing slicing of WebGLUnsignedShortArray
+PASS Setting Int16Array from array with out-of-range offset was caught
+PASS Setting Int16Array from fake array with invalid length was caught
+PASS Setting Int16Array from Int16Array with out-of-range offset was caught
+PASS Construction of Uint16Array with null buffer threw exception
+PASS Construction of Uint16Array with out-of-range values threw exception
+PASS Construction of Uint16Array with negative out-of-range values threw exception
+PASS Construction of huge Uint16Array threw exception
+Testing slicing of Uint16Array
PASS array.length is 32 / typeSize
PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
PASS array.slice(4, -2147483648).length is 0
-PASS Setting WebGLUnsignedShortArray from array with out-of-range offset was caught
-PASS Setting WebGLUnsignedShortArray from fake array with invalid length was caught
-PASS Setting WebGLUnsignedShortArray from WebGLUnsignedShortArray with out-of-range offset was caught
-PASS Construction of WebGLIntArray with null buffer threw exception
-PASS Construction of WebGLIntArray with out-of-range values threw exception
-PASS Construction of WebGLIntArray with negative out-of-range values threw exception
-PASS Construction of huge WebGLIntArray threw exception
-Testing slicing of WebGLIntArray
+PASS Setting Uint16Array from array with out-of-range offset was caught
+PASS Setting Uint16Array from fake array with invalid length was caught
+PASS Setting Uint16Array from Uint16Array with out-of-range offset was caught
+PASS Construction of Int32Array with null buffer threw exception
+PASS Construction of Int32Array with out-of-range values threw exception
+PASS Construction of Int32Array with negative out-of-range values threw exception
+PASS Construction of huge Int32Array threw exception
+Testing slicing of Int32Array
PASS array.length is 32 / typeSize
PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
PASS array.slice(4, -2147483648).length is 0
-PASS Setting WebGLIntArray from array with out-of-range offset was caught
-PASS Setting WebGLIntArray from fake array with invalid length was caught
-PASS Setting WebGLIntArray from WebGLIntArray with out-of-range offset was caught
-PASS Construction of WebGLUnsignedIntArray with null buffer threw exception
-PASS Construction of WebGLUnsignedIntArray with out-of-range values threw exception
-PASS Construction of WebGLUnsignedIntArray with negative out-of-range values threw exception
-PASS Construction of huge WebGLUnsignedIntArray threw exception
-Testing slicing of WebGLUnsignedIntArray
+PASS Setting Int32Array from array with out-of-range offset was caught
+PASS Setting Int32Array from fake array with invalid length was caught
+PASS Setting Int32Array from Int32Array with out-of-range offset was caught
+PASS Construction of Uint32Array with null buffer threw exception
+PASS Construction of Uint32Array with out-of-range values threw exception
+PASS Construction of Uint32Array with negative out-of-range values threw exception
+PASS Construction of huge Uint32Array threw exception
+Testing slicing of Uint32Array
PASS array.length is 32 / typeSize
PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
PASS array.slice(4, -2147483648).length is 0
-PASS Setting WebGLUnsignedIntArray from array with out-of-range offset was caught
-PASS Setting WebGLUnsignedIntArray from fake array with invalid length was caught
-PASS Setting WebGLUnsignedIntArray from WebGLUnsignedIntArray with out-of-range offset was caught
-PASS Construction of WebGLFloatArray with null buffer threw exception
-PASS Construction of WebGLFloatArray with out-of-range values threw exception
-PASS Construction of WebGLFloatArray with negative out-of-range values threw exception
-PASS Construction of huge WebGLFloatArray threw exception
-Testing slicing of WebGLFloatArray
+PASS Setting Uint32Array from array with out-of-range offset was caught
+PASS Setting Uint32Array from fake array with invalid length was caught
+PASS Setting Uint32Array from Uint32Array with out-of-range offset was caught
+PASS Construction of Float32Array with null buffer threw exception
+PASS Construction of Float32Array with out-of-range values threw exception
+PASS Construction of Float32Array with negative out-of-range values threw exception
+PASS Construction of huge Float32Array threw exception
+Testing slicing of Float32Array
PASS array.length is 32 / typeSize
PASS array.slice(4, 0x3FFFFFFF).length is (32 / typeSize) - 4
PASS array.slice(4, -2147483648).length is 0
-PASS Setting WebGLFloatArray from array with out-of-range offset was caught
-PASS Setting WebGLFloatArray from fake array with invalid length was caught
-PASS Setting WebGLFloatArray from WebGLFloatArray with out-of-range offset was caught
+PASS Setting Float32Array from array with out-of-range offset was caught
+PASS Setting Float32Array from fake array with invalid length was caught
+PASS Setting Float32Array from Float32Array with out-of-range offset was caught
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/canvas/webgl/webgl-array-invalid-ranges.html b/LayoutTests/fast/canvas/webgl/webgl-array-invalid-ranges.html
index 372b0d4..1056470 100644
--- a/LayoutTests/fast/canvas/webgl/webgl-array-invalid-ranges.html
+++ b/LayoutTests/fast/canvas/webgl/webgl-array-invalid-ranges.html
@@ -24,7 +24,7 @@ function testConstructionWithNullBuffer(type, name) {
function testConstructionWithOutOfRangeValues(type, name) {
- var buffer = new WebGLArrayBuffer(4);
+ var buffer = new ArrayBuffer(4);
var array;
try {
array = new type(buffer, 4, 0x3FFFFFFF);
@@ -35,7 +35,7 @@ function testConstructionWithOutOfRangeValues(type, name) {
}
function testConstructionWithNegativeOutOfRangeValues(type, name) {
- var buffer = new WebGLArrayBuffer(4);
+ var buffer = new ArrayBuffer(4);
var array;
try {
array = new type(buffer, 4, -2147483648);
@@ -65,7 +65,7 @@ var typeSize;
function testSlicingWithOutOfRangeValues(type, name, sz) {
debug("Testing slicing of " + name);
try {
- var buffer = new WebGLArrayBuffer(32);
+ var buffer = new ArrayBuffer(32);
array = new type(buffer);
typeSize = sz;
shouldBe("array.length", "32 / typeSize");
@@ -120,13 +120,13 @@ function testSettingFromWebGLArrayWithOutOfRangeOffset(type, name) {
}
}
-var typeNames = [ "WebGLByteArray",
- "WebGLUnsignedByteArray",
- "WebGLShortArray",
- "WebGLUnsignedShortArray",
- "WebGLIntArray",
- "WebGLUnsignedIntArray",
- "WebGLFloatArray" ];
+var typeNames = [ "Int8Array",
+ "Uint8Array",
+ "Int16Array",
+ "Uint16Array",
+ "Int32Array",
+ "Uint32Array",
+ "Float32Array" ];
var typeSizes = [ 1, 1, 2, 2, 4, 4, 4 ];
diff --git a/LayoutTests/fast/dom/Window/script-tests/window-property-descriptors.js b/LayoutTests/fast/dom/Window/script-tests/window-property-descriptors.js
index 5d7df6f..59c99f9 100644
--- a/LayoutTests/fast/dom/Window/script-tests/window-property-descriptors.js
+++ b/LayoutTests/fast/dom/Window/script-tests/window-property-descriptors.js
@@ -19,14 +19,6 @@ var __skip__ = {
"textInputController" : 1,
// Ignore these properties because they do not exist in all implementations. They will be tested separately
"WebGLRenderingContext" : 1,
- "WebGLArrayBuffer" : 1,
- "WebGLByteArray" : 1,
- "WebGLFloatArray" : 1,
- "WebGLIntArray" : 1,
- "WebGLShortArray" : 1,
- "WebGLUnsignedByteArray" : 1,
- "WebGLUnsignedIntArray" : 1,
- "WebGLUnsignedShortArray" : 1,
"ArrayBuffer" : 1,
"Int8Array" : 1,
"Uint8Array" : 1,
diff --git a/LayoutTests/fast/dom/Window/window-properties.html b/LayoutTests/fast/dom/Window/window-properties.html
index e828d86..3e0aaa3 100644
--- a/LayoutTests/fast/dom/Window/window-properties.html
+++ b/LayoutTests/fast/dom/Window/window-properties.html
@@ -62,14 +62,6 @@ var __skip__ = {
"window.textInputController" : 1,
// Ignore these properties because they do not exist in all implementations. They will be tested separately
"window.WebGLRenderingContext" : 1,
- "window.WebGLArrayBuffer" : 1,
- "window.WebGLByteArray" : 1,
- "window.WebGLFloatArray" : 1,
- "window.WebGLIntArray" : 1,
- "window.WebGLShortArray" : 1,
- "window.WebGLUnsignedByteArray" : 1,
- "window.WebGLUnsignedIntArray" : 1,
- "window.WebGLUnsignedShortArray" : 1,
"window.ArrayBuffer" : 1,
"window.Int8Array" : 1,
"window.Uint8Array" : 1,
diff --git a/LayoutTests/fast/dom/script-tests/prototype-inheritance.js b/LayoutTests/fast/dom/script-tests/prototype-inheritance.js
index ebf9438..843d8bb 100644
--- a/LayoutTests/fast/dom/script-tests/prototype-inheritance.js
+++ b/LayoutTests/fast/dom/script-tests/prototype-inheritance.js
@@ -15,8 +15,7 @@ var skippedProperties = [
// Ignore these properties because they do not exist in all implementations. They will be tested separately
"webkitNotifications",
"webkitPerformance",
- "WebGLRenderingContext", "WebGLArrayBuffer",
- "WebGLByteArray", "WebGLFloatArray", "WebGLIntArray", "WebGLShortArray", "WebGLUnsignedByteArray", "WebGLUnsignedIntArray", "WebGLUnsignedShortArray",
+ "WebGLRenderingContext",
"ArrayBuffer",
"Int8Array", "Uint8Array", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array",
"FileError", "FileReader",
diff --git a/LayoutTests/fast/js/script-tests/global-constructors.js b/LayoutTests/fast/js/script-tests/global-constructors.js
index c9a531c..03ef0df 100644
--- a/LayoutTests/fast/js/script-tests/global-constructors.js
+++ b/LayoutTests/fast/js/script-tests/global-constructors.js
@@ -18,14 +18,6 @@ for (var x in constructorNames) {
// Ignore these properties because they do not exist in all implementations. They will be tested separately
if (name == "WebGLRenderingContext" ||
- name == "WebGLArrayBuffer" ||
- name =="WebGLByteArray" ||
- name =="WebGLFloatArray" ||
- name =="WebGLIntArray" ||
- name =="WebGLShortArray" ||
- name =="WebGLUnsignedByteArray" ||
- name =="WebGLUnsignedIntArray" ||
- name =="WebGLUnsignedShortArray" ||
name == "ArrayBuffer" ||
name == "Int8Array" ||
name == "Uint8Array" ||
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 317e5dc..bdc46ae 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-11 Kenneth Russell <kbr at google.com>
+
+ Reviewed by David Levin.
+
+ Remove obsolete WebGLArray type names
+ https://bugs.webkit.org/show_bug.cgi?id=43885
+
+ Deleted aliases to obsolete WebGLArray type names. Updated
+ affected layout tests, synchronizing them with the versions in the
+ Khronos repository where appropriate. Ran all layout tests.
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ * page/DOMWindow.idl:
+
2010-08-11 Steve Block <steveblock at google.com>
Reviewed by David Levin.
diff --git a/WebCore/bindings/js/JSDOMWindowCustom.cpp b/WebCore/bindings/js/JSDOMWindowCustom.cpp
index 0a3ce4a..a67ad33 100644
--- a/WebCore/bindings/js/JSDOMWindowCustom.cpp
+++ b/WebCore/bindings/js/JSDOMWindowCustom.cpp
@@ -606,47 +606,6 @@ JSValue JSDOMWindow::float32Array(ExecState* exec) const
return getDOMConstructor<JSFloat32ArrayConstructor>(exec, this);
}
-// Temporary aliases to keep current WebGL content working during transition period to TypedArray spec.
-// To be removed before WebGL spec is finalized. (FIXME)
-JSValue JSDOMWindow::webGLArrayBuffer(ExecState* exec) const
-{
- return getDOMConstructor<JSArrayBufferConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLByteArray(ExecState* exec) const
-{
- return getDOMConstructor<JSInt8ArrayConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLUnsignedByteArray(ExecState* exec) const
-{
- return getDOMConstructor<JSUint8ArrayConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLIntArray(ExecState* exec) const
-{
- return getDOMConstructor<JSInt32ArrayConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLUnsignedIntArray(ExecState* exec) const
-{
- return getDOMConstructor<JSUint32ArrayConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLShortArray(ExecState* exec) const
-{
- return getDOMConstructor<JSInt16ArrayConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLUnsignedShortArray(ExecState* exec) const
-{
- return getDOMConstructor<JSUint16ArrayConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLFloatArray(ExecState* exec) const
-{
- return getDOMConstructor<JSFloat32ArrayConstructor>(exec, this);
-}
#endif
JSValue JSDOMWindow::xmlHttpRequest(ExecState* exec) const
diff --git a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
index a74faee..45cb1b4 100644
--- a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
@@ -67,16 +67,6 @@
#if ENABLE(WEB_SOCKETS)
#include "WebSocket.h"
#endif
-#if ENABLE(3D_CANVAS)
-#include "V8ArrayBuffer.h"
-#include "V8Int8Array.h"
-#include "V8Float32Array.h"
-#include "V8Int32Array.h"
-#include "V8Int16Array.h"
-#include "V8Uint8Array.h"
-#include "V8Uint32Array.h"
-#include "V8Uint16Array.h"
-#endif
#include "WindowFeatures.h"
namespace WebCore {
@@ -253,61 +243,6 @@ v8::Handle<v8::Value> V8DOMWindow::OptionAccessorGetter(v8::Local<v8::String> na
return V8DOMWrapper::getConstructor(&V8HTMLOptionElementConstructor::info, window);
}
-#if ENABLE(3D_CANVAS)
-
-// Temporary aliases to keep current WebGL content working during transition period to TypedArray spec.
-// To be removed before WebGL spec is finalized. (FIXME)
-v8::Handle<v8::Value> V8DOMWindow::WebGLArrayBufferAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
-{
- DOMWindow* window = V8DOMWindow::toNative(info.Holder());
- return V8DOMWrapper::getConstructor(&V8ArrayBuffer::info, window);
-}
-
-v8::Handle<v8::Value> V8DOMWindow::WebGLByteArrayAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
-{
- DOMWindow* window = V8DOMWindow::toNative(info.Holder());
- return V8DOMWrapper::getConstructor(&V8Int8Array::info, window);
-}
-
-v8::Handle<v8::Value> V8DOMWindow::WebGLUnsignedByteArrayAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
-{
- DOMWindow* window = V8DOMWindow::toNative(info.Holder());
- return V8DOMWrapper::getConstructor(&V8Uint8Array::info, window);
-}
-
-v8::Handle<v8::Value> V8DOMWindow::WebGLShortArrayAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
-{
- DOMWindow* window = V8DOMWindow::toNative(info.Holder());
- return V8DOMWrapper::getConstructor(&V8Int16Array::info, window);
-}
-
-v8::Handle<v8::Value> V8DOMWindow::WebGLUnsignedShortArrayAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
-{
- DOMWindow* window = V8DOMWindow::toNative(info.Holder());
- return V8DOMWrapper::getConstructor(&V8Uint16Array::info, window);
-}
-
-v8::Handle<v8::Value> V8DOMWindow::WebGLIntArrayAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
-{
- DOMWindow* window = V8DOMWindow::toNative(info.Holder());
- return V8DOMWrapper::getConstructor(&V8Int32Array::info, window);
-}
-
-v8::Handle<v8::Value> V8DOMWindow::WebGLUnsignedIntArrayAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
-{
- DOMWindow* window = V8DOMWindow::toNative(info.Holder());
- return V8DOMWrapper::getConstructor(&V8Uint32Array::info, window);
-}
-
-v8::Handle<v8::Value> V8DOMWindow::WebGLFloatArrayAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
-{
- DOMWindow* window = V8DOMWindow::toNative(info.Holder());
- return V8DOMWrapper::getConstructor(&V8Float32Array::info, window);
-}
-
-#endif
-
-
v8::Handle<v8::Value> V8DOMWindow::addEventListenerCallback(const v8::Arguments& args)
{
INC_STATS("DOM.DOMWindow.addEventListener()");
diff --git a/WebCore/page/DOMWindow.idl b/WebCore/page/DOMWindow.idl
index 41ac0a5..19bcbee 100644
--- a/WebCore/page/DOMWindow.idl
+++ b/WebCore/page/DOMWindow.idl
@@ -477,17 +477,6 @@ module window {
attribute [JSCCustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Uint32ArrayConstructor Uint32Array; // Usable with new operator
attribute [JSCCustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Float32ArrayConstructor Float32Array; // Usable with new operator
- // Temporary aliases to keep current WebGL content working during transition period to TypedArray spec.
- // To be removed before WebGL spec is finalized. (FIXME)
- attribute [CustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] ArrayBufferConstructor WebGLArrayBuffer; // Usable with new operator
- attribute [CustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Int8ArrayConstructor WebGLByteArray; // Usable with new operator
- attribute [CustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Uint8ArrayConstructor WebGLUnsignedByteArray; // Usable with new operator
- attribute [CustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Int16ArrayConstructor WebGLShortArray; // Usable with new operator
- attribute [CustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Uint16ArrayConstructor WebGLUnsignedShortArray; // Usable with new operator
- attribute [CustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Int32ArrayConstructor WebGLIntArray; // Usable with new operator
- attribute [CustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Uint32ArrayConstructor WebGLUnsignedIntArray; // Usable with new operator
- attribute [CustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Float32ArrayConstructor WebGLFloatArray; // Usable with new operator
-
attribute EventConstructor Event;
attribute BeforeLoadEventConstructor BeforeLoadEvent;
attribute KeyboardEventConstructor KeyboardEvent;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list