зеркало из https://github.com/mozilla/gecko-dev.git
Test for bug 642908 - Make the <noscript> handling state in the speculative document.write tree builder match the state of the non-speculative document.write tree builder. r=bzbarsky.
This commit is contained in:
Родитель
fc47678885
Коммит
c76ccda074
|
@ -84,6 +84,8 @@ _TEST_FILES = parser_datreader.js \
|
|||
file_bug594730-9.html \
|
||||
test_bug599584.html \
|
||||
iframe_bug599584.html \
|
||||
test_bug642908.html \
|
||||
file_bug642908.sjs \
|
||||
test_bug645115.html \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
function handleRequest(request, response)
|
||||
{
|
||||
if (request.queryString.indexOf("report") != -1) {
|
||||
response.setHeader("Content-Type", "text/javascript", false);
|
||||
if (getState("loaded") == "loaded") {
|
||||
response.write("ok(false, 'There was an attempt to preload the image.');");
|
||||
} else {
|
||||
response.write("ok(true, 'There was no attempt to preload the image.');");
|
||||
}
|
||||
response.write("SimpleTest.finish();");
|
||||
} else {
|
||||
setState("loaded", "loaded");
|
||||
response.setHeader("Content-Type", "image/svg", false);
|
||||
response.write("<svg xmlns='http://www.w3.org/2000/svg'>Not supposed to load this</svg>");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=642908
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 642908</title>
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body onload="loaded();">
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=642908">Mozilla Bug 642908</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
document.write("\u003Cscript src='data:text/javascript,1;'>\u003C/script>");
|
||||
document.write("<noscript><img src='file_bug642908.sjs'></noscript>");
|
||||
|
||||
function loaded() {
|
||||
var s = document.createElement("script");
|
||||
s.src = "file_bug642908.sjs?report=1";
|
||||
document.body.appendChild(s);
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче