Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / ManualTests / canvas-large-temporary.html
blobd8cb82b6bb151dc5085bb21ae94efd7dbf21621e
1 <html>
2 <head>
3 <script src="../LayoutTests/fast/js/resources/js-test-pre.js"></script>
4 </head>
5 <body>
6 <script>
7 description("Test to verify that serial allocation and dereferencing of large canvases will succeed");
8 // This is a manual test because it runs too slow as a LayoutTest, especially for GPU tests with mesa.
10 // 32 canvases of 8k x 8k will consume 8GB of RAM.
11 // Garbage collection should kick-in to prevent OOM failures.
12 for (var i = 0; i < 32; i++) {
13 var canvas = document.createElement('canvas');
14 canvas.width = 8192;
15 canvas.height = 8192;
16 // Draw to trigger lazy backing store allocation
17 var ctx = canvas.getContext('2d');
18 ctx.fillStyle = '#0f0';
19 ctx.fillRect(0, 0, 1, 1);
20 // Verify that allocation succeeded by verifying that draw succeeded
21 var imageData = ctx.getImageData(0, 0, 1, 1);
22 var imgdata = imageData.data;
23 shouldBe("imgdata[0]", "0");
24 shouldBe("imgdata[1]", "255");
25 shouldBe("imgdata[2]", "0");
27 </script>
28 <script src="../LayoutTests/fast/js/resources/js-test-post.js"></script>
29 </body>
30 </html>