Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/printing/webgl-oversized-printing.html |
| diff --git a/third_party/WebKit/LayoutTests/printing/webgl-oversized-printing.html b/third_party/WebKit/LayoutTests/printing/webgl-oversized-printing.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..95f1cb3f54e8a45e685f9f912c055350411f1a93 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/printing/webgl-oversized-printing.html |
| @@ -0,0 +1,27 @@ |
| +<!-- This is a regression test for crbug.com/537711, in which printing |
| + was causing a crash on the main thread of the render process --> |
| +<head> |
| +<script src="../resources/js-test.js"></script> |
| +</head> |
| +<body> |
| +<div id="console"></div> |
| +<script> |
| +var can = document.createElement('canvas'); |
| +can.width = can.height = 100000; // Too large to allocate because width*height overflows uint32 |
| +document.body.appendChild(can); |
| +var ctx = can.getContext("webgl"); |
| +ctx.clearColor(0, 0, 0, 0); |
|
Ken Russell (switch to Gerrit)
2015/10/01 02:33:30
Can you call ctx.clear(ctx.COLOR_BUFFER_BIT) here
|
| + |
| +if (!window.testRunner) { |
| + testFailed("Requires window.testRunner"); |
| +} else { |
| + testRunner.setPrinting(); |
| + testRunner.waitUntilDone(); |
| + testRunner.capturePixelsAsyncThen(function() { |
| + testRunner.clearPrinting(); |
| + testPassed("Printed without crashing."); |
| + testRunner.notifyDone(); |
| + }); |
| +} |
| +</script> |
| +</body> |