blob: 70212996eb69345c7f6b84d4b3a09bc27519c330 [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>requiredExtensions</title>
<meta charset="utf-8"/>
</head>
<body>
<!-- The following elements contain foreignObject with a list of required extensions. We should only display it when the list contains MathML or XHTML namespaces. -->
<p>This test passes if four green squares are displayed:</p>
<!-- This tests a required XHTML extension. -->
<svg width="100px" height="100px">
<switch>
<foreignObject requiredExtensions="http://www.w3.org/1999/xhtml" height="100" width="100">
<span style="display: inline-block; width: 100px; height: 100px; background: green"></span>
</foreignObject>
<rect width="100" height="100" fill="red"/>
</switch>
</svg>
<!-- This tests a required MathML extension. -->
<svg width="100px" height="100px">
<switch>
<foreignObject requiredExtensions="http://www.w3.org/1998/Math/MathML" height="100" width="100">
<math>
<mspace width="100px" height="100px" mathbackground="green"/>
</math>
</foreignObject>
<rect width="100" height="100" fill="red"/>
</switch>
</svg>
<!-- This tests required XHTML and MathML extensions. -->
<svg width="100px" height="100px">
<switch>
<foreignObject requiredExtensions="http://www.w3.org/1998/Math/MathML http://www.w3.org/1999/xhtml" height="100" width="100">
<span style="display: inline-block; width: 100px; height: 100px;">
<math>
<mspace width="100px" height="100px" mathbackground="green"/>
</math>
</span>
</foreignObject>
<rect width="100" height="100" fill="red"/>
</switch>
</svg>
<!-- This tests an unknown required extension. -->
<svg width="100px" height="100px">
<switch>
<foreignObject requiredExtensions="http://www.w3.org/1998/Math/MathML http://www.w3.org/1999/xhtml unknownExtension" height="100" width="100">
<span style="display: inline-block; width: 100px; height: 100px; background: red"></span>
</foreignObject>
<rect width="100" height="100" fill="green"/>
</switch>
</svg>
</body>
</html>