summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc
diff options
context:
space:
mode:
Diffstat (limited to 'dom/canvas/test/webgl-conf/checkout/conformance/textures/misc')
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/exif-orientation.html44
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html2
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-npot-video.html1
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-srgb-upload.html16
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-upload-size.html1
5 files changed, 34 insertions, 30 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/exif-orientation.html b/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/exif-orientation.html
index 3fd596d445..5a4b88e5b8 100644
--- a/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/exif-orientation.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/exif-orientation.html
@@ -56,35 +56,20 @@ function checkPixels(flipY)
}
}
-async function testImageBitmapFromBlobWithFlipY(blob, flipY)
+async function testImageBitmapWithFlipY(source, flipY)
{
- let bitmap;
- // As a concession to Firefox, which doesn't yet implement
- // createImageBitmap with creation options, skip the tests
- // involving flipY=true if ImageBitmap creation throws an
- // exception, and use the single-argument constructor for the
- // flipY=false case.
- if (flipY) {
- try {
- bitmap = await createImageBitmap(blob, {imageOrientation: flipY});
- } catch (e) {
- output(" (createImageBitmap options not supported - skipping flipY=true case)");
- return;
- }
- } else {
- bitmap = await createImageBitmap(blob);
- }
+ const bitmap = await createImageBitmap(source, flipY ? {imageOrientation: flipY} : undefined);
output(" Testing texImage2D, flipY = " + flipY);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, bitmap);
wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]);
- checkPixels(flipY);
+ checkPixels(flipY == "flipY");
output(" Testing texSubImage2D, flipY = " + flipY);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, bitmap.width, bitmap.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, bitmap);
wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]);
- checkPixels(flipY);
+ checkPixels(flipY == "flipY");
}
async function testImageBitmapFromBlob(filename)
@@ -93,8 +78,16 @@ async function testImageBitmapFromBlob(filename)
let blob = await response.blob();
output("----------------------------------------------------------------");
output("Testing " + filename + " via ImageBitmap from Blob");
- await testImageBitmapFromBlobWithFlipY(blob, true);
- await testImageBitmapFromBlobWithFlipY(blob, false);
+ await testImageBitmapWithFlipY(blob, "flipY");
+ await testImageBitmapWithFlipY(blob, "none");
+ await testImageBitmapWithFlipY(blob, undefined);
+}
+
+async function testImageBitmapFromImage(image)
+{
+ await testImageBitmapWithFlipY(image, "flipY");
+ await testImageBitmapWithFlipY(image, "none");
+ await testImageBitmapWithFlipY(image, undefined);
}
async function testImageElementWithFlipY(image, flipY)
@@ -124,6 +117,11 @@ async function testImageElement(filename)
await testImageElementWithFlipY(image, true);
await testImageElementWithFlipY(image, false);
+
+ output("----------------------------------------------------------------");
+ output("Testing " + filename + " via ImageBitmap from HTMLImageElement");
+
+ await testImageBitmapFromImage(image);
}
async function testSingleImage(filename)
@@ -149,9 +147,9 @@ async function run()
"exif-orientation-test-3-rotate-180.jpg",
"exif-orientation-test-4-mirror-vertical.jpg",
"exif-orientation-test-5-mirror-horizontal-90-ccw.jpg",
- "exif-orientation-test-6-90-ccw.jpg",
+ "exif-orientation-test-6-90-cw.jpg",
"exif-orientation-test-7-mirror-horizontal-90-cw.jpg",
- "exif-orientation-test-8-90-cw.jpg",
+ "exif-orientation-test-8-90-ccw.jpg",
];
for (let fn of filenames) {
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html b/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html
index ee9bad4341..1acc3a4380 100644
--- a/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html
@@ -96,8 +96,6 @@ found in the LICENSE.txt file.
type: 'video/webm; codecs="vp8, vorbis"' },
{ src: resourcePath + "red-green.bt601.vp9.webm",
type: 'video/webm; codecs="vp9"' },
- { src: resourcePath + "red-green.theora.ogv",
- type: 'video/ogg; codecs="theora, vorbis"' },
];
var currentVideo = null;
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-npot-video.html b/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-npot-video.html
index ef979d4c5a..9a8e3198ba 100644
--- a/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-npot-video.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-npot-video.html
@@ -154,7 +154,6 @@ function runTest(videoElement)
<video id="vid" style="display:none;" muted>
<source src="../../../resources/npot-video.mp4" type='video/mp4; codecs="avc1.42E01E"' />
<source src="../../../resources/npot-video.webmvp8.webm" type='video/webm; codecs="vp8"' />
- <source src="../../../resources/npot-video.theora.ogv" type='video/ogg; codecs="theora"' />
</video>
</body>
</html>
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-srgb-upload.html b/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-srgb-upload.html
index 3508670563..6f66bfdde6 100644
--- a/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-srgb-upload.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-srgb-upload.html
@@ -62,12 +62,22 @@ function invoke(fn) { return fn(); }
invoke(async () => {
const video = document.createElement("video");
video.src = DATA_URL_FOR_720p_png_bt709_bt709_tv_yuv420p_vp9_webm;
- //video.src = "Big_Buck_Bunny_360_10s_1MB.mp4";
- //video.src = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4";
+ if (!video.canPlayType('video/webm')) {
+ debug('Browser can not play webm videos. Skipping test.');
+ finishTest();
+ return;
+ }
+
video.muted = true;
video.loop = true;
video.crossOrigin = "anonymous";
- await video.play();
+ try {
+ await video.play();
+ } catch (e) {
+ debug('Browser could not play this specific video. Skipping test.');
+ finishTest();
+ return;
+ }
function renderTex(canvas, fn_tex_image) {
const gl = canvas.gl = wtu.create3DContext(canvas);
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-upload-size.html b/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-upload-size.html
index a0f30dc89f..b5ba6afed3 100644
--- a/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-upload-size.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/textures/misc/texture-upload-size.html
@@ -99,7 +99,6 @@ var tests = [
{type: "video", src: "../../../resources/red-green.mp4", videoType: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'},
{type: "video", src: "../../../resources/red-green.bt601.vp9.webm", videoType: 'video/webm; codecs="vp9"'},
{type: "video", src: "../../../resources/red-green.webmvp8.webm", videoType: 'video/webm; codecs="vp8, vorbis"'},
- {type: "video", src: "../../../resources/red-green.theora.ogv", videoType: 'video/ogg; codecs="theora, vorbis"'},
];
var testIndex = 0;