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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-skia-excessive-size.html

Issue 2944020: 2010-07-09 W. James MacLean <wjmaclean@chromium.org>... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/375/src/
Patch Set: Created 10 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-skia-excessive-size-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-skia-excessive-size.html
===================================================================
--- third_party/WebKit/LayoutTests/fast/canvas/canvas-skia-excessive-size.html (revision 0)
+++ third_party/WebKit/LayoutTests/fast/canvas/canvas-skia-excessive-size.html (revision 0)
@@ -0,0 +1,37 @@
+<head>
+<script>
+function print(message)
+{
+ var paragraph = document.createElement("li");
+ paragraph.appendChild(document.createTextNode(message));
+ document.getElementById("console").appendChild(paragraph);
+}
+function test()
+{
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ var canvas = document.getElementById("bigCanvas");
+ var width = canvas.width;
+ // We need to perform a context fetch to force allocation of
+ // canvas resources.
+ if (canvas.getContext)
+ {
+ var ctx = canvas.getContext("2d");
+ if (ctx == null)
+ {
+ print("Canvas 2d context = null!");
+ }
+ }
+
+ print("Survived canvas creation attempt. Width = " + width);
+}
+</script>
+</head>
+<body onload="test();">
+<canvas id="bigCanvas" width="134217728" height="1"></canvas>
+<p>This test checks to see if the browser survives the attempted creation
+of an excessively large canvas.</p>
+<hr>
+<p><ol id=console></ol></p>
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-skia-excessive-size-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698