Bug 1355430 - Part3: Add Mochitest Implementation; r=jgilbert

MozReview-Commit-ID: Jk4Ge3Syivj

--HG--
extra : rebase_source : 75218df5bae0efa100e7d8ea25396c4d4f269983
This commit is contained in:
Chih-Yi Leu 2017-04-14 14:26:51 +08:00
Родитель ca2cb984d5
Коммит 23a93db649
10 изменённых файлов: 123 добавлений и 0 удалений

Просмотреть файл

@ -6,6 +6,11 @@ support-files =
driver-info.js driver-info.js
es3-data.js es3-data.js
webgl-util.js webgl-util.js
test_video_fastpath.js
red-green.mp4
red-green.theora.ogv
red-green.webmvp8.webm
red-green.webmvp9.webm
[ensure-exts/test_ANGLE_instanced_arrays.html] [ensure-exts/test_ANGLE_instanced_arrays.html]
fail-if = (os == 'android') || (os == 'mac' && os_version == '10.6') fail-if = (os == 'android') || (os == 'mac' && os_version == '10.6')
@ -94,4 +99,12 @@ skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests
[test_webgl2_alpha_luminance.html] [test_webgl2_alpha_luminance.html]
skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests skip-if = toolkit == 'android' #bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests
[test_fuzzing_bugs.html] [test_fuzzing_bugs.html]
[test_video_fastpath_mp4.html]
fail-if = (os == 'mac') || (os == 'win')
[test_video_fastpath_theora.html]
fail-if = (os == 'mac')
[test_video_fastpath_vp8.html]
fail-if = (os == 'mac')
[test_video_fastpath_vp9.html]
fail-if = (os == 'mac')
[test_webglcontextcreationerror.html] [test_webglcontextcreationerror.html]

Двоичные данные
dom/canvas/test/webgl-mochitest/red-green.mp4 Normal file

Двоичный файл не отображается.

Двоичные данные
dom/canvas/test/webgl-mochitest/red-green.theora.ogv Normal file

Двоичный файл не отображается.

Двоичные данные
dom/canvas/test/webgl-mochitest/red-green.webmvp8.webm Normal file

Двоичный файл не отображается.

Двоичные данные
dom/canvas/test/webgl-mochitest/red-green.webmvp9.webm Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,26 @@
var gl;
var video;
function onPlayingTestVideo() {
video.removeEventListener("playing", onPlayingTestVideo, true);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video);
is(gl.getError(), gl.NO_ERROR, "texImage2D should not generate any error here.");
video.pause();
SimpleTest.finish();
}
function startTest(file) {
gl = document.createElement("canvas").getContext("webgl");
ext = gl.getExtension("MOZ_debug");
ok(ext, "MOZ_debug extenstion should exist");
gl.bindTexture(gl.TEXTURE_2D, gl.createTexture());
gl.pixelStorei(ext.UNPACK_REQUIRE_FASTPATH, true);
is(gl.getError(), gl.NO_ERROR, "pixelStorei should not generate any error here.");
video = document.createElement("video");
video.addEventListener("playing", onPlayingTestVideo, true);
video.preload = "auto";
video.src = file;
video.loop = true;
video.play();
}

Просмотреть файл

@ -0,0 +1,21 @@
<html>
<head>
<meta name="timeout" content="long"/>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
<title>Video Fastpath upload test</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="test_video_fastpath.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
</head>
<body>
<script>
function runTest() {
startTest("red-green.mp4");
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set" : [["webgl.enable-privileged-extensions", true]]}, runTest);
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,21 @@
<html>
<head>
<meta name="timeout" content="long"/>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
<title>Video Fastpath upload test</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="test_video_fastpath.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
</head>
<body>
<script>
function runTest() {
startTest("red-green.theora.ogv");
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set" : [["webgl.enable-privileged-extensions", true]]}, runTest);
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,21 @@
<html>
<head>
<meta name="timeout" content="long"/>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
<title>Video Fastpath upload test</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="test_video_fastpath.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
</head>
<body>
<script>
function runTest() {
startTest("red-green.webmvp8.webm");
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set" : [["webgl.enable-privileged-extensions", true]]}, runTest);
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,21 @@
<html>
<head>
<meta name="timeout" content="long"/>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
<title>Video Fastpath upload test</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="test_video_fastpath.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
</head>
<body>
<script>
function runTest() {
startTest("red-green.webmvp9.webm");
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set" : [["webgl.enable-privileged-extensions", true]]}, runTest);
</script>
</body>
</html>