back out 653fa694343e (Bug 704482) for leaks

This commit is contained in:
Daniel Holbert 2011-12-08 15:18:47 -08:00
parent de4f4f5abb
commit 648631d434
10 changed files with 0 additions and 232 deletions

View File

@ -104,15 +104,6 @@ _CHROME_FILES = imgutils.js \
animated-gif2.gif \
purple.gif \
test_svg_animatedGIF.html \
smil-event-begin.svg \
smil-event-beginEvent.svg \
smil-event-end.svg \
smil-event-endEvent.svg \
smil-event-repeat.svg \
smil-event-repeatEvent.svg \
smil-event-repeatN.svg \
smil-event-SVGLoad.svg \
test_smilEventsAllowedInImages.html \
test_bullet_animation.html \
test_background_image_anim.html \
filter.svg \

View File

@ -1,28 +0,0 @@
<!-- Helper file for test_smilEventsAllowedInImages.html
This testcase uses a valid event "SVGLoad" that isn't whitelisted in
script-disabled contexts. So when this file is viewed as an image,
the SVGLoad-triggered animation shouldn't fire. -->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
width="100" height="100" id="svg">
<!-- Red rect for initial bad rendering -->
<rect width="100%" height="100%" fill="red"/>
<!-- After 100ms, we slide in this lime rect and succeed -->
<rect x="-600" width="100%" height="100%" fill="lime">
<animate attributeName="x" by="600" begin="0.1"
dur="0.1" fill="freeze"/>
</rect>
<!-- HOWEVER, if the following "bad" animation successfully registers to
trigger off of "SVGLoad" (which it shouldn't, inside of an image), then
this orange rect will slide in first and cover up the lime rect's
destination area, blocking it from view.
NOTE: SVGLoad corresponds to "time 0" in the SMIL timeline. So if the
"bad" animation fires, it'll run before the other one (and will get in
the way before the lime rect is onscreen, making the test fail). -->
<rect x="-600" width="100%" height="100%" fill="orange">
<animate attributeName="x" by="600" begin="svg.SVGLoad"
dur="0.1" fill="freeze"/>
</rect>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,15 +0,0 @@
<!-- Helper file for test_smilEventsAllowedInImages.html
This testcase uses syncbase-timing with "begin". -->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
width="100" height="100">
<!-- Red rect for initial bad rendering -->
<rect width="100%" height="100%" fill="red"/>
<!-- dummy animation that our real animation registers to listen to -->
<set id="trigger" begin="0"/>
<rect x="-600" width="100%" height="100%" fill="lime">
<animate attributeName="x" by="600" begin="trigger.begin"
dur="0.1" fill="freeze"/>
</rect>
</svg>

Before

Width:  |  Height:  |  Size: 577 B

View File

@ -1,16 +0,0 @@
<!-- Helper file for test_smilEventsAllowedInImages.html
This testcase uses the event "beginEvent", which is whitelisted as
being usable in script-disabled contexts. -->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
width="100" height="100">
<!-- Red rect for initial bad rendering -->
<rect width="100%" height="100%" fill="red"/>
<!-- dummy animation that our real animation registers to listen to -->
<set id="trigger" begin="0"/>
<rect x="-600" width="100%" height="100%" fill="lime">
<animate attributeName="x" by="600" begin="trigger.beginEvent"
dur="0.1" fill="freeze"/>
</rect>
</svg>

Before

Width:  |  Height:  |  Size: 647 B

View File

@ -1,15 +0,0 @@
<!-- Helper file for test_smilEventsAllowedInImages.html
This testcase uses syncbase-timing with "end". -->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
width="100" height="100">
<!-- Red rect for initial bad rendering -->
<rect width="100%" height="100%" fill="red"/>
<!-- dummy animation that our real animation registers to listen to -->
<set id="trigger" begin="0" dur="0.01s"/>
<rect x="-600" width="100%" height="100%" fill="lime">
<animate attributeName="x" by="600" begin="trigger.end"
dur="0.1" fill="freeze"/>
</rect>
</svg>

Before

Width:  |  Height:  |  Size: 585 B

View File

@ -1,16 +0,0 @@
<!-- Helper file for test_smilEventsAllowedInImages.html
This testcase uses the event "endEvent", which is whitelisted as
being usable in script-disabled contexts. -->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
width="100" height="100">
<!-- Red rect for initial bad rendering -->
<rect width="100%" height="100%" fill="red"/>
<!-- dummy animation that our real animation registers to listen to -->
<set id="trigger" begin="0" dur="0.01s"/>
<rect x="-600" width="100%" height="100%" fill="lime">
<animate attributeName="x" by="600" begin="trigger.endEvent"
dur="0.1" fill="freeze"/>
</rect>
</svg>

Before

Width:  |  Height:  |  Size: 655 B

View File

@ -1,16 +0,0 @@
<!-- Helper file for test_smilEventsAllowedInImages.html
This testcase uses the event "repeat", which is whitelisted as
being usable in script-disabled contexts. -->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
width="100" height="100">
<!-- Red rect for initial bad rendering -->
<rect width="100%" height="100%" fill="red"/>
<!-- dummy animation that our real animation registers to listen to -->
<set id="trigger" begin="0" dur="0.01s" repeatCount="2"/>
<rect x="-600" width="100%" height="100%" fill="lime">
<animate attributeName="x" by="600" begin="trigger.repeat"
dur="0.1" fill="freeze"/>
</rect>
</svg>

Before

Width:  |  Height:  |  Size: 667 B

View File

@ -1,16 +0,0 @@
<!-- Helper file for test_smilEventsAllowedInImages.html
This testcase uses the event "repeatEvent", which is whitelisted as
being usable in script-disabled contexts. -->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
width="100" height="100">
<!-- Red rect for initial bad rendering -->
<rect width="100%" height="100%" fill="red"/>
<!-- dummy animation that our real animation registers to listen to -->
<set id="trigger" begin="0" dur="0.01s" repeatCount="2"/>
<rect x="-600" width="100%" height="100%" fill="lime">
<animate attributeName="x" by="600" begin="trigger.repeatEvent"
dur="0.1" fill="freeze"/>
</rect>
</svg>

Before

Width:  |  Height:  |  Size: 677 B

View File

@ -1,15 +0,0 @@
<!-- Helper file for test_smilEventsAllowedInImages.html
This testcase uses repeat-based timing with "repeat(2)". -->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
width="100" height="100">
<!-- Red rect for initial bad rendering -->
<rect width="100%" height="100%" fill="red"/>
<!-- dummy animation that our real animation registers to listen to -->
<set id="trigger" begin="0" dur="0.01s" repeatCount="2"/>
<rect x="-600" width="100%" height="100%" fill="lime">
<animate attributeName="x" by="600" begin="trigger.repeat(1)"
dur="0.1" fill="freeze"/>
</rect>
</svg>

Before

Width:  |  Height:  |  Size: 617 B

View File

@ -1,86 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=704482
-->
<head>
<title>Test for Bug 704482</title>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
<script type="application/javascript" src="imgutils.js"></script>
<script type="application/javascript" src="animationPolling.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=704482">
Mozilla Bug 704482
</a>
<p id="display"></p>
<div id="content">
<div id="referenceDiv" style="height: 100px; width: 100px;
display: none; background: lime;">
</div>
<div id="animatedImage">
<img id="img" style="display: none">
</div>
<div id="debug" style="display: none">
</div>
</div>
<pre id="test">
<script type="text/javascript;version=1.8">
const FAILURE_TIMEOUT = 120000; // Fail early after 120 seconds (2 minutes)
var gIntervalId;
var gImageList = [
"smil-event-begin.svg",
"smil-event-beginEvent.svg",
"smil-event-end.svg",
"smil-event-endEvent.svg",
"smil-event-repeat.svg",
"smil-event-repeatEvent.svg",
"smil-event-repeatN.svg",
"smil-event-SVGLoad.svg",
];
var gNextImageIdx = 0;
const gImageElem = document.getElementById("img");
const gRefElem = document.getElementById("referenceDiv");
const gDebugElem = document.getElementById("debug");
function preTestCleanup() {
gImageElem.removeAttribute("src");
gImageElem.style.display = "none";
gRefElem.style.display = "none";
gDebugElem.style.display = "none";
}
function beginNextTest() {
preTestCleanup();
let curImageIdx = gNextImageIdx++;
ok(curImageIdx < gImageList.length,
"test sanity-check -- shouldn't iterate past end of JS array");
gImageElem.setAttribute("src", gImageList[curImageIdx]);
let nextAction = (gNextImageIdx == gImageList.length ? null : beginNextTest);
let newTest = new AnimationTest(100, FAILURE_TIMEOUT, "referenceDiv",
"img", "debug" , "", "", false,
nextAction);
newTest.beginTest();
}
function main()
{
beginNextTest();
}
window.onload = main;
</script>
</pre>
</body>
</html>