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

Side by Side Diff: third_party/WebKit/LayoutTests/printing/webgl-oversized-printing.html

Issue 1380633003: Fixed WebGL printing crash due to failed buffer allocation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
(Empty)
1 <!-- This is a regression test for crbug.com/537711, in which printing
2 was causing a crash on the main thread of the render process -->
3 <head>
4 <script src="../resources/js-test.js"></script>
5 </head>
6 <body>
7 <div id="console"></div>
8 <script>
9 var can = document.createElement('canvas');
10 can.width = can.height = 100000; // Too large to allocate because width*height o verflows uint32
11 document.body.appendChild(can);
12 var ctx = can.getContext("webgl");
13 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
14
15 if (!window.testRunner) {
16 testFailed("Requires window.testRunner");
17 } else {
18 testRunner.setPrinting();
19 testRunner.waitUntilDone();
20 testRunner.capturePixelsAsyncThen(function() {
21 testRunner.clearPrinting();
22 testPassed("Printed without crashing.");
23 testRunner.notifyDone();
24 });
25 }
26 </script>
27 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698