Bug 468160 - Add test that does a redirect to a PNG inside an <object> tag. Our Mochitest framework will test for leaks for us.

This commit is contained in:
Joe Drew 2008-12-23 20:31:30 -05:00
parent 6958d78491
commit aac2d03952
4 changed files with 39 additions and 0 deletions

View File

@ -46,6 +46,9 @@ include $(topsrcdir)/config/rules.mk
_TEST_FILES = test_bug399925.html \
bug399925.gif \
bug468160.sjs \
test_bug468160.html \
red.png \
$(NULL)
libs:: $(_TEST_FILES)

View File

@ -0,0 +1,6 @@
function handleRequest(request, response)
{
response.setStatusLine("1.1", 302, "Found");
response.setHeader("Location", "red.png", false);
response.setHeader("Cache-Control", "no-cache", false);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

View File

@ -0,0 +1,30 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=468160
-->
<head>
<title>Test for Bug 468160</title>
<script type="application/javascript" src="/MochiKit/MochiKit.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>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=468160">Mozilla Bug 468160</a>
<p id="display"></p>
<div id="content" style="display: none">
<!-- bug468160.sjs does a simple redirect to a PNG image. As long as this
doesn't leak, this test passes. -->
<object data="bug468160.sjs"></object>
</div>
<pre id="test">
<script type="application/javascript">
ok(true, "test passed");
</script>
</pre>
</body>
</html>