blob: 69276fe7025a8737ff06b34d80520f0df84e1a08 [file] [log] [blame]
<p>Test how opaque base URLs work for fetching subresources.</p>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
<ol>
<li id=1>SUCCESS</li>
<li id=2>SUCCESS</li>
<li id=3>SUCCESS</li>
<li id=4>Expected failure, see <a href="http://bugs.webkit.org/show_bug.cgi?id=9706">bug 9706</a>.</li>
<li id=5>SUCCESS</li>
</ol>
<iframe id=f1 frameborder=0 src="data:text/html,<script src='top.document.getElementById(1).innerHTML = %22FAILURE%22;'></script>"></iframe>
<iframe id=f2 frameborder=0 src="data:text/html,<script src='text/javascript,top.document.getElementById(2).innerHTML = %22FAILURE%22;'></script>"></iframe>
<!--
Activity window displays errors when trying to load the contents of these frames.
This happens because KURL doesn't get the base URL from Document, bug 12408.
-->
<iframe id=f3 frameborder=0 src="javascript:'<script src=%22top.document.getElementById(3).innerHTML = %2522FAILURE%2522;%22></script>'"></iframe>
<iframe id=f4 frameborder=0 src="javascript:'<script src=%22javascript:%2527top.document.getElementById(4).innerHTML = %2522SUCCESS%2522;%2527%22></script>'"></iframe>
<iframe id=f5 frameborder=0 src="javascript:'<script src=%22%2527top.document.getElementById(5).innerHTML = %2522FAILURE%2522;%2527%22></script>'"></iframe>
<!-- These just shouldn't cause a recursion -->
<iframe frameborder=0 src="javascript:'<script src=%22 + %2527%2527%22></script>'"></iframe>
<iframe frameborder=0 src="data:text/html,<iframe frameborder=0 src='<p>FAILURE</p>' width=10 height=10></iframe>"></iframe>