mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1261158 - Convert test_animSVGImage2.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: JT02zkq1JJm
This commit is contained in:
parent
b071de6b2c
commit
5230acebee
@ -18,7 +18,6 @@ support-files =
|
||||
iframe.html
|
||||
imgutils.js
|
||||
invalid.jpg
|
||||
lime-anim-100x100-2.svg
|
||||
lime100x100.svg
|
||||
opaque.bmp
|
||||
purple.gif
|
||||
@ -31,7 +30,6 @@ support-files =
|
||||
bug1132427.html
|
||||
bug1132427.gif
|
||||
|
||||
[test_animSVGImage2.html]
|
||||
[test_animation.html]
|
||||
disabled = bug 1100497
|
||||
[test_animation2.html]
|
||||
|
@ -48,6 +48,7 @@ support-files =
|
||||
keep.png
|
||||
lime100x100.svg
|
||||
lime-anim-100x100.svg
|
||||
lime-anim-100x100-2.svg
|
||||
red.png
|
||||
restore-previous.gif
|
||||
restore-previous.png
|
||||
@ -104,3 +105,5 @@ disabled = bug 1060869
|
||||
[test_image_crossorigin_data_url.html]
|
||||
[test_animSVGImage.html]
|
||||
skip-if = buildapp == 'b2g' || os == 'android'
|
||||
[test_animSVGImage2.html]
|
||||
skip-if = buildapp == 'b2g' || os == 'android'
|
||||
|
@ -5,10 +5,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=907503
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 907503</title>
|
||||
<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="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
|
||||
<script type="application/javascript" src="imgutils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
<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=907503">Mozilla Bug 907503</a>
|
||||
@ -22,12 +22,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=907503
|
||||
<script type="application/javascript;version=1.8">
|
||||
/** Test for Bug 907503**/
|
||||
|
||||
SimpleTest.requestFlakyTimeout("Early failure timeout");
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
const FAILURE_TIMEOUT = 120000; // Fail early after 120 seconds (2 minutes)
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cc = SpecialPowers.Cc;
|
||||
const Ci = SpecialPowers.Ci;
|
||||
const gImg = document.getElementsByTagName("img")[0];
|
||||
|
||||
var gMyDecoderObserver; // value will be set in main()
|
||||
@ -85,7 +86,7 @@ function cleanUpAndFinish() {
|
||||
if (gIsTestFinished) {
|
||||
return;
|
||||
}
|
||||
let imgLoadingContent = gImg.QueryInterface(Ci.nsIImageLoadingContent);
|
||||
let imgLoadingContent = SpecialPowers.wrap(gImg).QueryInterface(Ci.nsIImageLoadingContent);
|
||||
imgLoadingContent.removeObserver(gMyDecoderObserver);
|
||||
SimpleTest.finish();
|
||||
gIsTestFinished = true;
|
||||
@ -99,8 +100,8 @@ function main() {
|
||||
observer.frameUpdate = myOnFrameUpdate;
|
||||
gMyDecoderObserver =
|
||||
Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools)
|
||||
.createScriptedObserver(observer);
|
||||
let imgLoadingContent = gImg.QueryInterface(Ci.nsIImageLoadingContent);
|
||||
.createScriptedObserver(SpecialPowers.wrapCallbackObject(observer));
|
||||
let imgLoadingContent = SpecialPowers.wrap(gImg).QueryInterface(Ci.nsIImageLoadingContent);
|
||||
imgLoadingContent.addObserver(gMyDecoderObserver);
|
||||
|
||||
// We want to test the cold loading behavior, so clear cache in case an
|
||||
|
Loading…
Reference in New Issue
Block a user