blob: 67c3a3ae838e5fe3f77117f48612aa71d330c4af [file] [log] [blame]
<html xmlns="">
<title>Links with fragment identifiers inside SVG fragments</title>
<style type="text/css">
div { padding-top: 500em; }
<p>The circle below is a link. When you activate the circle, nothing
should happen. If the document scrolls or the image pans when you
activate the link, the test has failed.</p>
<svg xmlns="" xmlns:xlink=""
height="20000" width="200" onload="runTest();">
<script type="text/ecmascript"><![CDATA[
if (window.testRunner) {
function checkNoNavigation()
var result = location.hash == '' ? 'PASS' : 'FAIL';
if (window.testRunner)
function runTest() {
if (window.eventSender) {
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window,
0, 0, 0, 0, 0, false, false, false, false, 0, null);
window.setTimeout("checkNoNavigation()", 0 );
} else {
// in manual mode
alert("Please use run-webkit-tests.");
<!-- Spec says that <a> can only link to animation elements,
otherwise it is invalid; that known attributes with
unsupported values are treated as if they hadn't been
specified when rendering; that if the attribute is not
specified, the effect is as if an empty value ("") was
specified; and that an empty attribute value (xlink:href="")
means that no link traversal occurs upon activation of the 'a'
element. So. Nothing should happen if you click it: -->
<a xlink:href="#test" id="link">
<circle cx="50" cy="50" r="50" fill="blue"/>
<circle cx="50" cy="19950" r="50" fill="red" id="test"/>