blob: a67e438793fb278490dcde9ba5a40925dea77d9e [file] [log] [blame]
<!doctype html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body>
<div id="console"></div>
<svg x="0px" y="0px" width="400px" height="300px">
<defs id="svg-defs"></defs>
<rect fill="url(#pattern)" height="148" width="259" y="1" x="1" stroke="#000000" />
</svg>
<script>
var defs = document.getElementById('svg-defs');
var newPattern = '<pattern id="svg-pattern" width="259" height="148" patternUnits="userSpaceOnUse"><path d="M 0 0 L 259 0 259 148 0 148 z" stroke="#fff" stroke-width="1" fill="#00ff00"></path></pattern>';
defs.innerHTML = newPattern;
var verify = document.getElementById('svg-pattern');
testPassed(verify.innerHTML);
</script>
</body>