Bug 1384048 - Update 212563-2.html to comply with new data: URI inheritance model. r=smaug

This commit is contained in:
Christoph Kerschbaumer 2017-07-25 12:13:50 +02:00
Родитель 8c36096164
Коммит 3671da468b
4 изменённых файлов: 16 добавлений и 14 удалений

Просмотреть файл

@ -3,7 +3,7 @@
</head>
<frameset resizable="yes" rows="100%" onload="parent.changeInnermost(document.getElementById(&quot;innermost&quot;))">
<frame id="innermost" src="data:text/html,<font color=red>old innermost"></frame>
<frame id="innermost" src="212563-2-innermost-b.html"></frame>
</frameset>
</html>

Просмотреть файл

@ -0,0 +1,13 @@
<body onload="w(parent.document, top);">
<font color=blue>new innermost
<script type="text/javascript">
function w(md, t)
{
t.p(0);
md.write(t.replacementForMiddleFrame);
t.p(3);
t.p(md.documentElement.innerHTML);
md.close();
t.p(4);
}
</script>

Просмотреть файл

@ -0,0 +1 @@
<font color=red>old innermost

Просмотреть файл

@ -10,24 +10,12 @@ function p(n)
// Step 1: replace the innermost frame
function changeInnermost(iframeElement)
{
iframeElement.setAttribute("src",
"data:text/html,<body onload='" + w + "w(parent.document, top);'><font color=blue>new innermost");
iframeElement.setAttribute("src", "212563-2-innermost-a.html");
}
// Step 2: replace the middle iframe (from the new innermost iframe's onload handler)
var replacementForMiddleFrame = "<body onload=top.p(5);parent.document.documentElement.removeAttribute('class');>replacement for middle frame<script>top.p(2);<\/script><\/body>";
function w(md, t)
{
t.p(0);
md.write(t.replacementForMiddleFrame);
t.p(3);
t.p(md.documentElement.innerHTML);
md.close();
t.p(4);
}
</script>
</head>
<body>