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

Side by Side Diff: LayoutTests/fast/canvas/webgl/canvas-test.html

Issue 196573042: Remove display() from more layout tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More expectations Created 6 years, 9 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
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd"> 2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html> 3 <html>
4 <head> 4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>WebGL Canvas Conformance Tests</title> 6 <title>WebGL Canvas Conformance Tests</title>
7 <script src="resources/desktop-gl-constants.js" type="text/javascript"></script> 7 <script src="resources/desktop-gl-constants.js" type="text/javascript"></script>
8 <script src="../../../resources/js-test.js"></script> 8 <script src="../../../resources/js-test.js"></script>
9 <script src="resources/webgl-test.js"></script> 9 <script src="resources/webgl-test.js"></script>
10 <script src="../../../resources/run-after-display.js"></script>
10 </head> 11 </head>
11 <body> 12 <body>
12 <div id="description"></div> 13 <div id="description"></div>
13 <div id="console"></div> 14 <div id="console"></div>
14 <canvas id="canvas" style="width: 50px; height: 50px;"> </canvas> 15 <canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
15 <canvas id="canvas2d" width="40" height="40"> </canvas> 16 <canvas id="canvas2d" width="40" height="40"> </canvas>
16 <script> 17 <script>
17 if (window.initNonKhronosFramework) { 18 if (window.initNonKhronosFramework) {
18 window.initNonKhronosFramework(true); 19 window.initNonKhronosFramework(true);
19 } 20 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 127
127 checkCanvasContentIs(0, 0, 0, 0); 128 checkCanvasContentIs(0, 0, 0, 0);
128 shouldBe('getViewport()', '"0,0,300,150"'); 129 shouldBe('getViewport()', '"0,0,300,150"');
129 130
130 // Change the display size of the canvas and check 131 // Change the display size of the canvas and check
131 // the viewport size does not change. 132 // the viewport size does not change.
132 debug(""); 133 debug("");
133 debug("change display size of canvas and see that viewport does not change"); 134 debug("change display size of canvas and see that viewport does not change");
134 canvas.style.width = "100px"; 135 canvas.style.width = "100px";
135 canvas.style.height = "25px"; 136 canvas.style.height = "25px";
136 var intervalId; 137 runAfterDisplay(function() {
137 intervalId = window.setInterval(function() {
138 if (window.testRunner)
139 testRunner.display();
140 if (canvas.clientWidth == 100 && 138 if (canvas.clientWidth == 100 &&
141 canvas.clientHeight == 25) { 139 canvas.clientHeight == 25) {
142 window.clearInterval(intervalId);
143 shouldBe('getViewport()', '"0,0,300,150"'); 140 shouldBe('getViewport()', '"0,0,300,150"');
144 shouldBe('canvas.width', '300'); 141 shouldBe('canvas.width', '300');
145 shouldBe('canvas.height', '150'); 142 shouldBe('canvas.height', '150');
146 143
147 // Change the actual size of the canvas 144 // Change the actual size of the canvas
148 // Check that the viewport does not change. 145 // Check that the viewport does not change.
149 // Check that the clear color does not change. 146 // Check that the clear color does not change.
150 // Check that the color mask does not change. 147 // Check that the color mask does not change.
151 debug(""); 148 debug("");
152 debug("change the actual size of the canvas and see that the viewport does not change"); 149 debug("change the actual size of the canvas and see that the viewport does not change");
(...skipping 16 matching lines...) Expand all
169 isAboutEqual(v[2], 0) && 166 isAboutEqual(v[2], 0) &&
170 isAboutEqual(v[3], 0), 167 isAboutEqual(v[3], 0),
171 "gl.colorMask should not change after canvas resize"); 168 "gl.colorMask should not change after canvas resize");
172 shouldBe('getViewport()', '"0,0,300,150"'); 169 shouldBe('getViewport()', '"0,0,300,150"');
173 checkCanvasContentIs(0, 0, 0, 0); 170 checkCanvasContentIs(0, 0, 0, 0);
174 171
175 debug(""); 172 debug("");
176 173
177 finishJSTest(); 174 finishJSTest();
178 } 175 }
179 }, 1000/30); 176 });
180 } 177 }
181 178
182 </script> 179 </script>
183 <script> 180 <script>
184 </script> 181 </script>
185 182
186 </body> 183 </body>
187 </html> 184 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698