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

Side by Side Diff: conformance/drawingbuffer-static-canvas-test.html

Issue 8344024: Remove older revision of webgl conformance tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/webgl/sdk/tests/
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « conformance/draw-elements-out-of-bounds.html ('k') | conformance/drawingbuffer-test.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!--
2 Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file.
5 -->
6 <!DOCTYPE html>
7 <html>
8 <head>
9 <meta charset="utf-8">
10 <title>WebGL Canvas Conformance Tests</title>
11 <link rel="stylesheet" href="../resources/js-test-style.css"/>
12 <script src="../resources/js-test-pre.js"></script>
13 <script src="resources/webgl-test.js"></script>
14 <script src="resources/webgl-test-utils.js"></script>
15 </head>
16 <body>
17 <div id="description"></div>
18 <div id="console"></div>
19 <canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
20 <script>
21 description("This test ensures WebGL implementations correctly implement drawing bufferWidth/Height with compositing.");
22
23 debug("");
24
25 var wtu = WebGLTestUtils;
26 var err;
27 var maxSize;
28 var canvas = document.getElementById("canvas");
29 var gl = wtu.create3DContext(canvas);
30 if (!gl) {
31 testFailed("context does not exist");
32 } else {
33 testPassed("context exists");
34
35 debug("");
36 debug("Checking drawingBufferWidth/drawingBufferHeight");
37
38 // Check that a canvas with no width or height is 300x150 pixels
39 shouldBe('gl.drawingBufferWidth', 'canvas.width');
40 shouldBe('gl.drawingBufferHeight', 'canvas.height');
41
42 // Check that changing the canvas size to something too large falls back to re asonable values.
43 maxSize = gl.getParameter(gl.MAX_VIEWPORT_DIMS);
44 shouldBeTrue('maxSize[0] > 0');
45 shouldBeTrue('maxSize[1] > 0');
46
47 // debug("MAX_VIEWPORT_DIMS = " + maxSize[0] + "x" + maxSize[1]);
48 canvas.width = maxSize[0] * 4;
49 canvas.height = maxSize[1] * 4;
50 shouldBeTrue('gl.drawingBufferWidth > 0');
51 shouldBeTrue('gl.drawingBufferHeight > 0');
52 shouldBeTrue('gl.drawingBufferWidth <= maxSize[0]');
53 shouldBeTrue('gl.drawingBufferHeight <= maxSize[1]');
54 shouldBe('gl.getError()', 'gl.NO_ERROR');
55 }
56 debug("")
57 successfullyParsed = true;
58 </script>
59 <script src="../resources/js-test-post.js"></script>
60 </body>
61 </html>
OLDNEW
« no previous file with comments | « conformance/draw-elements-out-of-bounds.html ('k') | conformance/drawingbuffer-test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698