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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/webgl/canvas-2d-webgl-texture.html

Issue 2447493002: Removed some duplicate layout tests under fast/canvas/webgl (Closed)
Patch Set: Created 4 years, 2 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/canvas-2d-webgl-texture.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/webgl/canvas-2d-webgl-texture.html b/third_party/WebKit/LayoutTests/fast/canvas/webgl/canvas-2d-webgl-texture.html
deleted file mode 100644
index fad7cfb54b0f21318339b3d8e734d87125477c61..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/canvas/webgl/canvas-2d-webgl-texture.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<html>
-<head>
-<script src="../../../resources/js-test.js"></script>
-<script src="resources/webgl-test.js"></script>
-<script src="resources/webgl-test-utils.js"> </script>
-</head>
-<script>
-description("Checks that copying canvas results to a WebGL texture functions without error.");
-
-var wtu = WebGLTestUtils;
-
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-
-var canvas;
-var gl;
-var ctx;
-
-function draw()
-{
- ctx.fillStyle = "rgb(200, 0, 0)";
- ctx.fillRect(0, 0, 256, 256);
- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d);
-
- wtu.drawQuad(gl);
- wtu.checkCanvasRect(gl, 0, 0, 1, 1, [200, 0, 0, 255], "Should have rendered red.", 1);
-
- ctx.fillStyle = "rgb(0, 0, 200)";
- ctx.fillRect(0, 0, 256, 256);
- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d);
- ctx.fillStyle = "rgb(200, 0, 0)";
- ctx.fillRect(0, 0, 256, 256);
-
- wtu.drawQuad(gl);
- wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0, 0, 200, 255], "Should have rendered blue.", 1);
-
- if (window.testRunner)
- testRunner.notifyDone();
-}
-
-window.onload = function()
-{
- if (window.initNonKhronosFramework)
- window.initNonKhronosFramework(false);
-
- canvas = document.getElementById("webgl-canvas");
- gl = create3DContext(canvas);
-
- canvas2d = document.getElementById("canvas-2d");
-
- // Set a size that ensures a hardware-accelerated canvas.
- canvas2d.width = 256;
- canvas2d.height = 256;
- ctx = canvas2d.getContext("2d");
-
- var program = wtu.setupTexturedQuad(gl);
- var bufferObjects = wtu.setupUnitQuad(gl);
-
- var texture = gl.createTexture();
- gl.bindTexture(gl.TEXTURE_2D, texture);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
-
- gl.uniform1i(gl.getUniformLocation(program, "tex"), 0);
- gl.viewport(0, 0, canvas.width, canvas.height);
-
- // Ensure that the compositor has become active.
- setTimeout(draw, 0);
-}
-</script>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<canvas id="webgl-canvas" width="32px" height="32px"></canvas>
-<canvas id="canvas-2d" style="transform: translateZ(0);"></canvas>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698