1<!doctype HTML>
2<html>
3 <head>
4 <title>HTML5 Canvas Test: Ignore property-independent style sheet syntax "inherit" in Text</title>
5 <link rel="author" title="Microsoft" href="http://www.microsoft.com" />
6 <link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-font" />
7 <meta name="assert" content=": Ignore 'inherit' property-independent style sheet syntax without assigning a new font value." />
8 <script type="text/javascript">
9 function runTest()
10 {
11 var canvas = document.getElementById("canvas1");
12 var ctx = canvas.getContext("2d");
13
14 // Assign a valid font.
15 ctx.font = "40px Times New Roman";
16
17 // Assign property-independent style sheet syntax 'inherit' as font.
18 ctx.font = "20px inherit";
19 ctx.fillText("Test String", 5, 50);
20
21 // Assign a valid font which was used earlier.
22 ctx.font = "40px Times New Roman";
23 ctx.fillText("Test String", 5, 100);
24 }
25 </script>
26 </head>
27
28 <body onload="runTest()">
29 <p>Description: Ignore "inherit" property-independent style sheet syntax without assigning a new font value.</p>
30 <p>Test passes if both strings are identical in both size, style, and text.</p>
31 <canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
32 </body>
33</html>