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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/imageData-oom.html

Issue 1414553002: Fix out-of-memory crashes related to ArrayBuffer allocation Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+more tweaks Created 5 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/imageData-oom-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 if (window.testRunner) {
9 testRunner.dumpAsText();
10 }
11 var canvas = document.createElement('canvas');
12 canvas.width = 100;
13 canvas.height = 100;
14 var ctx = canvas.getContext('2d');
15 if (!window.internals) {
16 testFailed('Test requires the internals interface.');
17 } else {
18 var data;
19 internals.fakeOutOfMemoryForNextArrayBufferAllocation();
20 shouldThrow('data = ctx.getImageData(0, 0, 100, 100)');
21 shouldNotThrow('data = ctx.getImageData(0, 0, 100, 100)');
22
23 internals.fakeOutOfMemoryForNextArrayBufferAllocation();
24 shouldThrow('data = ctx.createImageData(100, 100)');
25 shouldNotThrow('data = ctx.createImageData(100, 100)');
26
27 internals.fakeOutOfMemoryForNextArrayBufferAllocation();
28 shouldThrow('data = new ImageData(100, 100)');
29 shouldNotThrow('data = new ImageData(100, 100)');
30 }
31 </script>
32 </body>
33 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/imageData-oom-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698