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

Unified 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, 3 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698