Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
| 3 <script> | 3 <script> |
| 4 description("Tests that the constructor of the OffscreenCanvas can be called on the main thread"); | 4 description("Tests that the OffscreenCanvas can be called on the main thread"); |
| 5 | 5 |
| 6 var aCanvas = new OffscreenCanvas(50, 50); | 6 var aCanvas = new OffscreenCanvas(50, 50); |
| 7 shouldBe("aCanvas.width", "50"); | 7 shouldBe("aCanvas.width", "50"); |
| 8 shouldBe("aCanvas.height", "50"); | 8 shouldBe("aCanvas.height", "50"); |
| 9 | 9 |
| 10 aCanvas.width = 100; | 10 aCanvas.width = 100; |
| 11 aCanvas.height = 100; | 11 aCanvas.height = 100; |
| 12 shouldBe("aCanvas.width", "100"); | 12 shouldBe("aCanvas.width", "100"); |
| 13 shouldBe("aCanvas.height", "100"); | 13 shouldBe("aCanvas.height", "100"); |
| 14 | |
| 15 shouldNotThrow("aCanvas.getContext('2d')"); | |
|
Justin Novosad
2016/03/02 15:41:50
You should test the return value. Something like t
xlai (Olivia)
2016/03/03 22:50:06
Done.
| |
| 14 </script> | 16 </script> |
| OLD | NEW |