22 lines
445 B
HTML
22 lines
445 B
HTML
<html>
|
|
<head>
|
|
<style>
|
|
div { background: -webkit-canvas(squares); width:600px; height:600px; border:2px solid black }
|
|
</style>
|
|
<script>
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
|
|
function draw(w, h) {
|
|
var ctx = document.getCSSCanvasContext("4d", "squares", w, h);
|
|
if (ctx !== null)
|
|
alert("FAIL! ctx wasn't null: " + ctx);
|
|
alert("PASS");
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="draw(300, 300)">
|
|
<div></div>
|
|
</body>
|
|
</html>
|