Index: third_party/WebKit/LayoutTests/fast/canvas/webgl/css-webkit-canvas.html |
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/webgl/css-webkit-canvas.html b/third_party/WebKit/LayoutTests/fast/canvas/webgl/css-webkit-canvas.html |
deleted file mode 100644 |
index 5d61c90cef398a00362cda6c26e12f49c1edd45a..0000000000000000000000000000000000000000 |
--- a/third_party/WebKit/LayoutTests/fast/canvas/webgl/css-webkit-canvas.html |
+++ /dev/null |
@@ -1,129 +0,0 @@ |
-<html> |
- <head> |
- <style> |
- #target { |
- width:200px; |
- height:200px; |
- border:2px solid black; |
- content: -webkit-canvas(triangle); |
- } |
- </style> |
- |
- <script id="vertexShader" type="x-shader/x-vertex"> |
- attribute vec4 vPosition; |
- |
- void main() { |
- gl_Position = vPosition; |
- } |
- </script> |
- |
- <script id="fragmentShader" type="x-shader/x-fragment"> |
- void main() { |
- gl_FragColor = vec4(0.8, 0.7, 0, 1.0); |
- } |
- </script> |
- |
- <script type="application/x-javascript"> |
- function getFragmentShader() |
- { |
- var shaderNode = document.getElementById("fragmentShader"); // fragmentShader has been defined at the top |
- var shaderSource = getShaderSource(shaderNode); |
- |
- var shader = gl.createShader(gl.FRAGMENT_SHADER); |
- gl.shaderSource(shader, shaderSource); |
- gl.compileShader(shader); |
- |
- return shader; |
- } |
- |
- function getShaderSource(shaderNode) |
- { |
- var shaderSource = ""; |
- var node = shaderNode.firstChild; |
- while (node) { |
- if (node.nodeType == 3) // Node.TEXT_NODE |
- shaderSource += node.textContent; |
- node = node.nextSibling; |
- } |
- |
- return shaderSource; |
- } |
- |
- function getVertexShader() |
- { |
- var shaderNode = document.getElementById("vertexShader"); |
- var shaderSource = getShaderSource(shaderNode); |
- |
- var shader = gl.createShader(gl.VERTEX_SHADER); |
- gl.shaderSource(shader, shaderSource); |
- gl.compileShader(shader); |
- |
- return shader; |
- } |
- |
- function initialize() |
- { |
- gl = document.getCSSCanvasContext("webgl", "triangle", 200, 200); |
- |
- var vertexShader = getVertexShader(); |
- var fragmentShader = getFragmentShader(); |
- |
- var shaderProgram = gl.createProgram(); |
- gl.attachShader(shaderProgram, vertexShader); |
- gl.attachShader(shaderProgram, fragmentShader); |
- gl.bindAttribLocation(shaderProgram, 0, "vPosition"); // vPosition has been defined at the top |
- gl.linkProgram(shaderProgram); |
- |
- gl.useProgram(shaderProgram); |
- |
- var buffer = gl.createBuffer(); |
- gl.bindBuffer(gl.ARRAY_BUFFER, buffer); |
- } |
- |
- function draw(r, g, b) |
- { |
- 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 Float32Array(vertices), gl.STATIC_DRAW); |
- |
- gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0); // Load the vertex data |
- gl.enableVertexAttribArray(0); |
- gl.clearColor(r, g, b, 1); |
- gl.clear(gl.COLOR_BUFFER_BIT); |
- gl.drawArrays(gl.TRIANGLES, 0, 3); |
- } |
- |
- if (window.testRunner) |
- testRunner.overridePreference("WebKitWebGLEnabled", "1"); |
- |
- initialize(); |
- draw(0, 0.5, 0); |
- </script> |
- </head> |
- <body> |
- <div id="target"></div> |
- <div id="console"></div> |
- </body> |
- <script> |
- function log(str) { |
- var li = document.createElement("li"); |
- li.appendChild(document.createTextNode(str)); |
- var console = document.getElementById("console"); |
- console.appendChild(li); |
- } |
- function assert(bool, text) { |
- if (!bool) |
- log(text + "Failure"); |
- } |
- window.onload = function() { |
- if (window.testRunner && window.internals) { |
- window.testRunner.layoutAndPaintAsyncThen(function() { |
- assert(window.internals.isUseCounted(document, 753), "has -webkit-canvas UseCounter: "); // 753 == UseCounter::Feature::WebkitCanvas |
- testRunner.notifyDone(); |
- }); |
- } |
- } |
- testRunner.waitUntilDone(); |
- </script> |
-</html> |