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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/OffScreenCanvas-invalid-args.html

Issue 1488763002: Start an empty interface OffScreenCanvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better overflow handle and more test cases Created 5 years 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
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <script>
4 description("Tests that the OffScreenCanvas can handle invalid arguments");
5
6 // Since blink uses signed int internally, this case tests how the constructor
7 // responses to the arguments that are larger than INT_MAX which would cause
Justin Novosad 2015/12/03 19:06:11 responses -> responds
xidachen 2015/12/03 20:42:22 Done.
8 // overflow.
Justin Novosad 2015/12/03 19:06:11 Add: the current implementation is expected to cla
xidachen 2015/12/03 20:42:22 Done.
9 var setWidth = Math.pow(2, 31);
10 var setHeight = Math.pow(2, 31);
11 var canvas1 = new OffScreenCanvas(setWidth, setHeight);
12
13 shouldBe("canvas1.width", "setWidth-1");
14 shouldBe("canvas1.height", "setHeight-1");
15
16 var canvas2 = new OffScreenCanvas(-1, -1);
17 shouldBe("canvas2.width", "setWidth-1");
Justin Novosad 2015/12/03 19:06:11 This looks like a bug to me. The WebIDL spec says
xidachen 2015/12/03 20:42:22 The WebIDL: http://www.w3.org/TR/WebIDL/#es-unsign
18 shouldBe("canvas2.height", "setHeight-1");
19
20 var canvas3 = new OffScreenCanvas(null, null);
21 shouldBe("canvas3.width", "0");
22 shouldBe("canvas3.height", "0");
23
24 var obj = {Name: "John Doe", Age: 30};
25 var canvas4 = new OffScreenCanvas(obj, obj);
26 shouldBe("canvas4.width", "0");
27 shouldBe("canvas4.height", "0");
28 </script>
Justin Novosad 2015/12/03 19:06:11 still missing test coverage for assigning invalid
xidachen 2015/12/03 20:42:22 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698