blob: c8080334284de25a19797c8cac1cd60f40feb8ac [file] [log] [blame]
<html>
<body>
<p>This test makes sure we can't open SVG documents in Dashboard compatibility mode. It can not be tested manually.</p>
<script>
if (window.layoutTestController) {
layoutTestController.setUseDashboardCompatibilityMode(true);
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
function debug(str) {
var c = document.getElementById('console')
c.appendChild(document.createTextNode(str + '\n'));
}
setTimeout("timeOut()", 500);
function timeOut() {
try {
var failed = false;
var svgDoc = null;
try {
svgDoc = document.getElementById('svgObject').getSVGDocument();
} catch (e) {
svgDoc = null;
}
if (svgDoc) {
debug("FAIL: Loaded SVG document in <object> tag.");
failed = true;
} else
debug("PASS: Did not load SVG document in <object> tag");
try {
svgDoc = document.getElementById('svgEmbed').getSVGDocument();
} catch (e) {
svgDoc = null;
}
if (svgDoc) {
debug("FAIL: Loaded SVG document in <element> tag.");
failed = true;
} else
debug("PASS: Did not load SVG document in <element> tag");
try {
svgDoc = document.getElementById('svgIFrame').getSVGDocument();
} catch (e) {
svgDoc = null;
}
if (svgDoc) {
debug("FAIL: Loaded SVG document in <iframe> tag.");
failed = true;
} else
debug("PASS: Did not load SVG document in <iframe> tag");
if (failed)
debug("FAIL: SVG Documents were loaded");
else
debug("PASS: SVG Documents were not loaded");
} catch (e) {
debug("FAIL: Exception thrown: " + e)
}
if (window.layoutTestController)
layoutTestController.notifyDone();
}
</script>
<object id="svgObject" data="../W3C-SVG-1.1/text-ws-02-t.svg" width="100px" height="100px"></object>
<embed id="svgElement" src="../W3C-SVG-1.1/text-ws-02-t.svg" width="100px" height="100px"></embed>
<iframe id="svgIFrame" src="../W3C-SVG-1.1/text-ws-02-t.svg" width="100px" height="100px"></iframe>
<pre id="console"></pre>
</body>
</html>