| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../http/tests/inspector/resources/inspector-test.js"></script> |
| <script src="resources/recording-utilities.js"></script> |
| <script src="resources/shaderProgram-utilities-webgl.js"></script> |
| <script id="vertex-shader" type="x-shader/x-vertex"> |
| attribute vec4 test; |
| uniform vec4 testUniform; |
| void main(void) { |
| gl_Position = test + testUniform; |
| } |
| </script> |
| <script id="fragment-shader" type="x-shader/x-fragment"> |
| precision mediump float; |
| |
| void main(void) { |
| gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); |
| } |
| </script> |
| <script src="resources/recording-webgl.js"></script> |
| <script> |
| function test() { |
| let suite = InspectorTest.createAsyncSuite("Canvas.recordingWebGL"); |
| |
| suite.addTestCase({ |
| name: "Canvas.recordingWebGL.memoryLimit", |
| description: "Check that the recording is stopped when it reaches the memory limit.", |
| test(resolve, reject) { |
| startRecording(WI.Canvas.ContextType.WebGL, resolve, reject, {memoryLimit: 10}); |
| }, |
| timeout: -1, |
| }); |
| |
| suite.runTestCasesAndFinish(); |
| } |
| </script> |
| </head> |
| <body onload="load()"> |
| <p>Test that CanvasManager is able to record actions made to WebGL canvas contexts.</p> |
| </body> |
| </html> |