mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-28 07:33:16 +00:00
add tests
This commit is contained in:
@@ -125,6 +125,19 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script id="CanvasRenderingContext2D#canvas">
|
||||||
|
{
|
||||||
|
const element = document.createElement("canvas");
|
||||||
|
const ctx = element.getContext("2d");
|
||||||
|
testing.expectEqual(ctx.canvas, element);
|
||||||
|
// Setting dimensions via ctx.canvas should update the element.
|
||||||
|
ctx.canvas.width = 40;
|
||||||
|
ctx.canvas.height = 25;
|
||||||
|
testing.expectEqual(element.width, 40);
|
||||||
|
testing.expectEqual(element.height, 25);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<script id="getter">
|
<script id="getter">
|
||||||
{
|
{
|
||||||
const element = document.createElement("canvas");
|
const element = document.createElement("canvas");
|
||||||
|
|||||||
Reference in New Issue
Block a user