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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/webgl/attrib-location-length-limits.html

Issue 1601093008: Remove duplicated WebGL layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/canvas/webgl/attrib-location-length-limits.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/webgl/attrib-location-length-limits.html b/third_party/WebKit/LayoutTests/fast/canvas/webgl/attrib-location-length-limits.html
deleted file mode 100644
index 7c7cc94faf61a9b1f99e3b5c4e56d35ecb25cb46..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/canvas/webgl/attrib-location-length-limits.html
+++ /dev/null
@@ -1,98 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>WebGL attrib location length tests</title>
-<script src="../../../resources/js-test.js"></script>
-<script src="resources/webgl-test.js"> </script>
-<script src="resources/webgl-test-utils.js"> </script>
-</head>
-<body>
-<canvas id="example" width="50" height="50">
-There is supposed to be an example drawing here, but it's not important.
-</canvas>
-<div id="description">Verify limits on the lengths of attrib locations.</div>
-<div id="console"></div>
-<script id="goodVertexShader1" type="x-shader/x-vertex">
-// A vertex shader where the needed attrib location is long, but not over the limit.
-attribute vec4 vPosition01234567890123456789012345678901234567890123456789012345678901234567890;
-
-void main()
-{
- gl_Position = vPosition01234567890123456789012345678901234567890123456789012345678901234567890;
-}
-</script>
-<script id="goodVertexShader2" type="x-shader/x-vertex">
-// A vertex shader where the needed attrib location is exactly 256 characters.
-attribute vec4 vPosition0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;
-
-void main()
-{
- gl_Position = vPosition0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;
-}
-</script>
-<script id="badVertexShader" type="x-shader/x-vertex">
-// A vertex shader where the needed attrib location is 257 characters.
-attribute vec4 vPosition01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567;
-
-void main()
-{
- gl_Position = vPosition01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567;
-}
-</script>
-<script id="fragmentShader" type="x-shader/x-fragment">
-precision mediump float;
-
-void main() {
- gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
-}
-</script>
-<script>
-if (window.initNonKhronosFramework) {
- window.initNonKhronosFramework(false);
-}
-if (window.internals)
- window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
-
-var wtu = WebGLTestUtils;
-var gl = wtu.create3DContext(document.getElementById("example"));
-
-debug("Test attrib location underneath the length limit");
-var program = wtu.loadProgramFromScript(gl, "goodVertexShader1", "fragmentShader");
-shouldBe('gl.getProgramParameter(program, gl.LINK_STATUS)', 'true');
-var attribLoc = gl.getAttribLocation(program, "vPosition01234567890123456789012345678901234567890123456789012345678901234567890");
-if (attribLoc == -1) {
- testFailed("attrib location was -1, should not be");
-} else {
- testPassed("attrib location should not be -1");
-}
-wtu.glErrorShouldBe(gl, gl.NONE);
-
-debug("Test attrib location exactly at the length limit");
-var program = wtu.loadProgramFromScript(gl, "goodVertexShader2", "fragmentShader");
-shouldBe('gl.getProgramParameter(program, gl.LINK_STATUS)', 'true');
-var attribLoc = gl.getAttribLocation(program, "vPosition0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456");
-if (attribLoc == -1) {
- testFailed("attrib location was -1, should not be");
-} else {
- testPassed("attrib location should not be -1");
-}
-wtu.glErrorShouldBe(gl, gl.NONE);
-
-debug("Test attrib location over the length limit");
-debug("Shader compilation should fail");
-shouldBe('wtu.loadShaderFromScript(gl, "badVertexShader", gl.VERTEX_SHADER, function (err) {})', 'null');
-wtu.glErrorShouldBe(gl, gl.NONE);
-
-debug("Attempt to bind too-long attrib location should produce error");
-var program = gl.createProgram();
-gl.bindAttribLocation(program, 0, "vPosition01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567");
-wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
-
-debug("Attempt to fetch too-long attrib location should produce error");
-shouldBe('gl.getAttribLocation(program, "vPosition01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567")', '-1');
-wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
-
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698