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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-longlived-context.html

Issue 2694703004: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Created 3 years, 10 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
1 <script src="../../resources/testharness.js"></script>
2 <script src="../../resources/testharnessreport.js"></script>
3 <script>
4 test(function(t) {
1 5
2 <script src="../../resources/js-test.js"></script> 6 var context = document.createElement("canvas").getContext("2d");
3 <script src="canvas-longlived-context.js"></script> 7 context.fillStyle = "green";
8 context.fillRect(0,0,100,100);
9
10 function clobberGC(count) {
11 for (var i = 0; i < 5000; ++i)
12 ({a: i*i*i*0.5+"str", b: i/Math.sqrt(i)});
13 if (count > 0)
14 clobberGC(count-1);
15 }
16
17 clobberGC(40);
18 assert_array_equals(context.getImageData(50, 50, 1, 1).data, [0, 128, 0, 255 ]);
19
20 }, 'This test ensures that Canvas and CanvasRenderingContext2D work correctly if the rendering context outlives the canvas element.');
21
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698