blob: 43c971cecd56f8a8ee587bf6feff19f5a6f6ba36 [file] [log] [blame]
<html>
<head>
<script>
window.onload = function()
{
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpChildFramesAsText();
testRunner.waitUntilDone();
}
if (window.testRunner) {
setTimeout(pollForTest, 1);
} else {
alert("This test requires it be run in DRT.");
}
}
pollForTest = function()
{
if (!testRunner.globalFlag) {
setTimeout(pollForTest, 1);
return;
}
runTest();
testRunner.notifyDone();
}
runTest = function()
{
var frame = document.getElementById('aFrame');
var newSrc = document.createAttribute("src");
newSrc.value = 'javascript:"FAIL: this should not have been loaded."';
frame.setAttributeNodeNS(newSrc);
newSrc.value = ' javascript:"FAIL: this should not have been loaded."';
frame.setAttributeNodeNS(newSrc);
newSrc.value = 'java\0script:"FAIL: this should not have been loaded."';
frame.setAttributeNodeNS(newSrc);
newSrc.value = 'javascript\t:"FAIL: this should not have been loaded."';
frame.setAttributeNodeNS(newSrc);
newSrc.value = 'javascript\1:"FAIL: this should not have been loaded."';
frame.setAttributeNodeNS(newSrc);
}
</script>
</head>
<frameset rows="10%,*">
<frame id='main' name='main' src="data:text/html,<p>This test passes as long as the word 'FAIL' and an accompanying message do not appear in the frame below.</p>">
<frame id='aFrame' name='aFrame' src='http://localhost:8000/security/resources/cross-frame-iframe.html'>
</frameset>
</html>