diff --git a/modules/libpr0n/test/mochitest/Makefile.in b/modules/libpr0n/test/mochitest/Makefile.in index fd4b258d5945..ac31cf1de694 100644 --- a/modules/libpr0n/test/mochitest/Makefile.in +++ b/modules/libpr0n/test/mochitest/Makefile.in @@ -62,6 +62,9 @@ _TEST_FILES = imgutils.js \ bug496292-iframe-2.html \ bug496292-1.sjs \ bug496292-2.sjs \ + test_bug512435.html \ + damon.jpg \ + shaver.png \ $(NULL) libs:: $(_TEST_FILES) diff --git a/modules/libpr0n/test/mochitest/damon.jpg b/modules/libpr0n/test/mochitest/damon.jpg new file mode 100644 index 000000000000..917b336607fb Binary files /dev/null and b/modules/libpr0n/test/mochitest/damon.jpg differ diff --git a/modules/libpr0n/test/mochitest/imgutils.js b/modules/libpr0n/test/mochitest/imgutils.js index 55f9741fb90b..87681cba0aa1 100644 --- a/modules/libpr0n/test/mochitest/imgutils.js +++ b/modules/libpr0n/test/mochitest/imgutils.js @@ -3,6 +3,15 @@ // Note that this is use by tests elsewhere in the source tree. When in doubt, // check mxr before removing or changing functionality. +// Helper function to clear the image cache of content images +function clearImageCache() +{ + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + var imageCache = Components.classes["@mozilla.org/image/cache;1"] + .getService(Components.interfaces.imgICache); + imageCache.clearCache(false); // true=chrome, false=content +} + // Helper function to determine if the frame is decoded for a given image id function isFrameDecoded(id) { diff --git a/modules/libpr0n/test/mochitest/shaver.png b/modules/libpr0n/test/mochitest/shaver.png new file mode 100644 index 000000000000..ab0b6c7b4017 Binary files /dev/null and b/modules/libpr0n/test/mochitest/shaver.png differ diff --git a/modules/libpr0n/test/mochitest/test_bug512435.html b/modules/libpr0n/test/mochitest/test_bug512435.html new file mode 100644 index 000000000000..3e698de10606 --- /dev/null +++ b/modules/libpr0n/test/mochitest/test_bug512435.html @@ -0,0 +1,50 @@ + + + + + Test for Bug 512435 + + + + + + +Mozilla Bug 512435 + + + +
+
+
+ +